summaryrefslogtreecommitdiffstats
path: root/chrome/common/pepper_permission_util.h
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-15 01:26:39 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-15 01:26:39 +0000
commitdda548290e9f9a48c2fcd8ecc4a2c9cdb4b2fc0b (patch)
treeb9acb7bcd9208535f63844ab171e124f4aca2996 /chrome/common/pepper_permission_util.h
parent21c9dee7008633174272cf5b61d547916ad31ad8 (diff)
downloadchromium_src-dda548290e9f9a48c2fcd8ecc4a2c9cdb4b2fc0b.zip
chromium_src-dda548290e9f9a48c2fcd8ecc4a2c9cdb4b2fc0b.tar.gz
chromium_src-dda548290e9f9a48c2fcd8ecc4a2c9cdb4b2fc0b.tar.bz2
Change the permission check for Pepper socket API to support both the public and private APIs.
BUG=247225 TEST=None Review URL: https://chromiumcodereview.appspot.com/17029002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/pepper_permission_util.h')
-rw-r--r--chrome/common/pepper_permission_util.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/common/pepper_permission_util.h b/chrome/common/pepper_permission_util.h
index 8ff9e84..81e48ba 100644
--- a/chrome/common/pepper_permission_util.h
+++ b/chrome/common/pepper_permission_util.h
@@ -13,14 +13,21 @@ class GURL;
namespace chrome {
-// Returns true if the extension (or an imported module if any) is whitelisted,
-// or appears in command_line_switch.
+// Returns true if the extension (or an imported module if any) is whitelisted.
bool IsExtensionOrSharedModuleWhitelisted(
const GURL& url,
const ExtensionSet* extension_set,
- const std::set<std::string>& whitelist,
- const char* command_line_switch);
+ const std::set<std::string>& whitelist);
+// Checks whether the host of |url| is allowed by |command_line_switch|.
+//
+// If the value of |command_line_switch| is:
+// (1) '*': returns true for any packaged or platform apps;
+// (2) a list of host names separated by ',': returns true if |host| is in the
+// list. (NOTE: In this case, |url| doesn't have to belong to an extension.)
+bool IsHostAllowedByCommandLine(const GURL& url,
+ const ExtensionSet* extension_set,
+ const char* command_line_switch);
} // namespace chrome
#endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_