| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/common/extensions/features/simple_feature.h" | 5 #include "chrome/common/extensions/features/simple_feature.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 contexts["blessed_extension"] = Feature::BLESSED_EXTENSION_CONTEXT; | 34 contexts["blessed_extension"] = Feature::BLESSED_EXTENSION_CONTEXT; |
| 35 contexts["unblessed_extension"] = Feature::UNBLESSED_EXTENSION_CONTEXT; | 35 contexts["unblessed_extension"] = Feature::UNBLESSED_EXTENSION_CONTEXT; |
| 36 contexts["content_script"] = Feature::CONTENT_SCRIPT_CONTEXT; | 36 contexts["content_script"] = Feature::CONTENT_SCRIPT_CONTEXT; |
| 37 contexts["web_page"] = Feature::WEB_PAGE_CONTEXT; | 37 contexts["web_page"] = Feature::WEB_PAGE_CONTEXT; |
| 38 | 38 |
| 39 locations["component"] = Feature::COMPONENT_LOCATION; | 39 locations["component"] = Feature::COMPONENT_LOCATION; |
| 40 | 40 |
| 41 platforms["chromeos"] = Feature::CHROMEOS_PLATFORM; | 41 platforms["chromeos"] = Feature::CHROMEOS_PLATFORM; |
| 42 platforms["linux"] = Feature::LINUX_PLATFORM; | 42 platforms["linux"] = Feature::LINUX_PLATFORM; |
| 43 platforms["macosx"] = Feature::MACOSX_PLATFORM; | 43 platforms["mac"] = Feature::MACOSX_PLATFORM; |
| 44 platforms["windows"] = Feature::WIN_PLATFORM; | 44 platforms["win"] = Feature::WIN_PLATFORM; |
| 45 | 45 |
| 46 channels["trunk"] = VersionInfo::CHANNEL_UNKNOWN; | 46 channels["trunk"] = VersionInfo::CHANNEL_UNKNOWN; |
| 47 channels["canary"] = VersionInfo::CHANNEL_CANARY; | 47 channels["canary"] = VersionInfo::CHANNEL_CANARY; |
| 48 channels["dev"] = VersionInfo::CHANNEL_DEV; | 48 channels["dev"] = VersionInfo::CHANNEL_DEV; |
| 49 channels["beta"] = VersionInfo::CHANNEL_BETA; | 49 channels["beta"] = VersionInfo::CHANNEL_BETA; |
| 50 channels["stable"] = VersionInfo::CHANNEL_STABLE; | 50 channels["stable"] = VersionInfo::CHANNEL_STABLE; |
| 51 } | 51 } |
| 52 | 52 |
| 53 std::map<std::string, Manifest::Type> extension_types; | 53 std::map<std::string, Manifest::Type> extension_types; |
| 54 std::map<std::string, Feature::Context> contexts; | 54 std::map<std::string, Feature::Context> contexts; |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 if (whitelist.find(extension_id) != whitelist.end() || | 505 if (whitelist.find(extension_id) != whitelist.end() || |
| 506 whitelist.find(HashExtensionId(extension_id)) != whitelist.end()) { | 506 whitelist.find(HashExtensionId(extension_id)) != whitelist.end()) { |
| 507 return true; | 507 return true; |
| 508 } | 508 } |
| 509 | 509 |
| 510 return false; | 510 return false; |
| 511 } | 511 } |
| 512 | 512 |
| 513 } // namespace extensions | 513 } // namespace extensions |
| OLD | NEW |