Move origin url validation check to PermissionContextBase class.
commita2830559eda8642679901cf8ababe61daa1a0d17
authortimvolodine <timvolodine@chromium.org>
Tue, 20 Jan 2015 17:21:23 +0000 (20 09:21 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 20 Jan 2015 17:23:04 +0000 (20 17:23 +0000)
tree16a312eabd9b9ad2a33300f400404285475319c6
parent569ce1bcb696473c117b8afdc15871183c0052ef
Move origin url validation check to PermissionContextBase class.

Currently the validity check for the origin url and embedding url is performed
within the permissions related code on a case by case basis, i.e. for each API
separately. This patch moves the check to the base class to have a uniform
code path for all permissions in chrome. Also added a test.

BUG=

Review URL: https://codereview.chromium.org/815743003

Cr-Commit-Position: refs/heads/master@{#312217}
chrome/browser/content_settings/permission_context_base.cc
chrome/browser/content_settings/permission_context_base_unittest.cc
chrome/browser/geolocation/geolocation_permission_context.cc
chrome/browser/media/protected_media_identifier_permission_context.cc