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

Side by Side Diff: chrome/browser/extensions/external_component_loader.cc

Issue 1010973013: Refactor Uses of std::set to std::vector in SimpleFeature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Unsigned From Checks with STLCount Created 5 years, 9 months 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/extensions/external_component_loader.h" 5 #include "chrome/browser/extensions/external_component_loader.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/search/hotword_service.h" 10 #include "chrome/browser/search/hotword_service.h"
(...skipping 23 matching lines...) Expand all
34 ExternalComponentLoader::~ExternalComponentLoader() {} 34 ExternalComponentLoader::~ExternalComponentLoader() {}
35 35
36 // static 36 // static
37 bool ExternalComponentLoader::IsModifiable(const Extension* extension) { 37 bool ExternalComponentLoader::IsModifiable(const Extension* extension) {
38 if (extension->location() == Manifest::EXTERNAL_COMPONENT) { 38 if (extension->location() == Manifest::EXTERNAL_COMPONENT) {
39 static const char* const kEnhancedExtensions[] = { 39 static const char* const kEnhancedExtensions[] = {
40 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900 40 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
41 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444 41 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
42 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562 42 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
43 }; 43 };
44 return SimpleFeature::IsIdInList( 44 return SimpleFeature::IsIdInArray(
45 extension->id(), 45 extension->id(), kEnhancedExtensions, arraysize(kEnhancedExtensions));
46 std::set<std::string>(
47 kEnhancedExtensions,
48 kEnhancedExtensions + arraysize(kEnhancedExtensions)));
49 } 46 }
50 return false; 47 return false;
51 } 48 }
52 49
53 void ExternalComponentLoader::StartLoading() { 50 void ExternalComponentLoader::StartLoading() {
54 prefs_.reset(new base::DictionaryValue()); 51 prefs_.reset(new base::DictionaryValue());
55 std::string app_id = extension_misc::kInAppPaymentsSupportAppId; 52 std::string app_id = extension_misc::kInAppPaymentsSupportAppId;
56 prefs_->SetString(app_id + ".external_update_url", 53 prefs_->SetString(app_id + ".external_update_url",
57 extension_urls::GetWebstoreUpdateUrl().spec()); 54 extension_urls::GetWebstoreUpdateUrl().spec());
58 55
(...skipping 28 matching lines...) Expand all
87 if (GetGoogleNowExtensionId(&google_now_extension_id)) { 84 if (GetGoogleNowExtensionId(&google_now_extension_id)) {
88 prefs_->SetString(google_now_extension_id + ".external_update_url", 85 prefs_->SetString(google_now_extension_id + ".external_update_url",
89 extension_urls::GetWebstoreUpdateUrl().spec()); 86 extension_urls::GetWebstoreUpdateUrl().spec());
90 } 87 }
91 #endif 88 #endif
92 89
93 LoadFinished(); 90 LoadFinished();
94 } 91 }
95 92
96 } // namespace extensions 93 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698