Chromium Code Reviews| Index: chrome/common/pepper_permission_util.cc |
| diff --git a/chrome/common/pepper_permission_util.cc b/chrome/common/pepper_permission_util.cc |
| index 822c77f02626985275027009175c884f096d51b7..8b5afe63ef7745eba48a8cd5c34d6edb56414bc2 100644 |
| --- a/chrome/common/pepper_permission_util.cc |
| +++ b/chrome/common/pepper_permission_util.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/sha1.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/strings/string_tokenizer.h" |
| +#if defined(ENABLE_EXTENSIONS) |
|
Lei Zhang
2015/01/21 21:32:22
It looks like all the callers to IsExtensionOrShar
sehr
2015/01/22 19:57:22
Great suggestion. Done.
|
| #include "extensions/common/constants.h" |
| #include "extensions/common/extension.h" |
| #include "extensions/common/extension_set.h" |
| @@ -18,9 +19,11 @@ |
| using extensions::Extension; |
| using extensions::Manifest; |
| using extensions::SharedModuleInfo; |
| +#endif // defined(ENABLE_EXTENSIONS) |
| namespace chrome { |
| +#if defined(ENABLE_EXTENSIONS) |
| namespace { |
| std::string HashHost(const std::string& host) { |
| @@ -34,11 +37,13 @@ bool HostIsInSet(const std::string& host, const std::set<std::string>& set) { |
| } |
| } // namespace |
| +#endif // defined(ENABLE_EXTENSIONS) |
| bool IsExtensionOrSharedModuleWhitelisted( |
| const GURL& url, |
| const extensions::ExtensionSet* extension_set, |
| const std::set<std::string>& whitelist) { |
| +#if defined(ENABLE_EXTENSIONS) |
| if (!url.is_valid() || !url.SchemeIs(extensions::kExtensionScheme)) |
| return false; |
| @@ -66,6 +71,7 @@ bool IsExtensionOrSharedModuleWhitelisted( |
| return true; |
| } |
| } |
| +#endif // defined(ENABLE_EXTENSIONS) |
| return false; |
| } |
| @@ -73,6 +79,7 @@ bool IsExtensionOrSharedModuleWhitelisted( |
| bool IsHostAllowedByCommandLine(const GURL& url, |
| const extensions::ExtensionSet* extension_set, |
| const char* command_line_switch) { |
| +#if defined(ENABLE_EXTENSIONS) |
| if (!url.is_valid()) |
| return false; |
| @@ -101,6 +108,7 @@ bool IsHostAllowedByCommandLine(const GURL& url, |
| return true; |
| } |
| +#endif // defined(ENABLE_EXTENSIONS) |
| return false; |
| } |