| Index: chrome/browser/extensions/external_component_loader.cc
|
| diff --git a/chrome/browser/extensions/external_component_loader.cc b/chrome/browser/extensions/external_component_loader.cc
|
| index c9f449c9196687c1bcb8da81926fcc6b7008b9bf..327df7055d67c887d8f0770399ce19c733cb94d9 100644
|
| --- a/chrome/browser/extensions/external_component_loader.cc
|
| +++ b/chrome/browser/extensions/external_component_loader.cc
|
| @@ -4,7 +4,6 @@
|
|
|
| #include "chrome/browser/extensions/external_component_loader.h"
|
|
|
| -#include "base/sha1.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
|
| #include "chrome/browser/browser_process.h"
|
| @@ -15,6 +14,7 @@
|
| #include "components/signin/core/browser/signin_manager.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/extension_urls.h"
|
| +#include "extensions/common/features/simple_feature.h"
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "base/command_line.h"
|
| @@ -32,16 +32,16 @@ ExternalComponentLoader::~ExternalComponentLoader() {}
|
| // static
|
| bool ExternalComponentLoader::IsModifiable(const Extension* extension) {
|
| if (extension->location() == Manifest::EXTERNAL_COMPONENT) {
|
| - static const char* const enhanced_extension_hashes[] = {
|
| + static const char* const kEnhancedExtensions[] = {
|
| "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
|
| "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
|
| "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
|
| };
|
| - std::string hash = base::SHA1HashString(extension->id());
|
| - hash = base::HexEncode(hash.c_str(), hash.length());
|
| - for (size_t i = 0; i < arraysize(enhanced_extension_hashes); i++)
|
| - if (hash == enhanced_extension_hashes[i])
|
| - return true;
|
| + return SimpleFeature::IsIdInList(
|
| + extension->id(),
|
| + std::set<std::string>(
|
| + kEnhancedExtensions,
|
| + kEnhancedExtensions + arraysize(kEnhancedExtensions)));
|
| }
|
| return false;
|
| }
|
|
|