Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: chrome/common/pepper_permission_util.h

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/localized_error.cc ('k') | chrome/common/pepper_permission_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_ 5 #ifndef CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
6 #define CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_ 6 #define CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 class GURL;
12
13 namespace extensions {
11 class ExtensionSet; 14 class ExtensionSet;
12 class GURL; 15 }
13 16
14 namespace chrome { 17 namespace chrome {
15 18
16 // Returns true if the extension (or an imported module if any) is whitelisted. 19 // Returns true if the extension (or an imported module if any) is whitelisted.
17 bool IsExtensionOrSharedModuleWhitelisted( 20 bool IsExtensionOrSharedModuleWhitelisted(
18 const GURL& url, 21 const GURL& url,
19 const ExtensionSet* extension_set, 22 const extensions::ExtensionSet* extension_set,
20 const std::set<std::string>& whitelist); 23 const std::set<std::string>& whitelist);
21 24
22 // Checks whether the host of |url| is allowed by |command_line_switch|. 25 // Checks whether the host of |url| is allowed by |command_line_switch|.
23 // 26 //
24 // If the value of |command_line_switch| is: 27 // If the value of |command_line_switch| is:
25 // (1) '*': returns true for any packaged or platform apps; 28 // (1) '*': returns true for any packaged or platform apps;
26 // (2) a list of host names separated by ',': returns true if |host| is in the 29 // (2) a list of host names separated by ',': returns true if |host| is in the
27 // list. (NOTE: In this case, |url| doesn't have to belong to an extension.) 30 // list. (NOTE: In this case, |url| doesn't have to belong to an extension.)
28 bool IsHostAllowedByCommandLine(const GURL& url, 31 bool IsHostAllowedByCommandLine(const GURL& url,
29 const ExtensionSet* extension_set, 32 const extensions::ExtensionSet* extension_set,
30 const char* command_line_switch); 33 const char* command_line_switch);
31 } // namespace chrome 34 } // namespace chrome
32 35
33 #endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_ 36 #endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/localized_error.cc ('k') | chrome/common/pepper_permission_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698