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

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

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_management.h" 5 #include "chrome/browser/extensions/extension_management.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 if (dict_pref) { 369 if (dict_pref) {
370 // Parse new extension management preference. 370 // Parse new extension management preference.
371 for (base::DictionaryValue::Iterator iter(*dict_pref); !iter.IsAtEnd(); 371 for (base::DictionaryValue::Iterator iter(*dict_pref); !iter.IsAtEnd();
372 iter.Advance()) { 372 iter.Advance()) {
373 if (iter.key() == schema_constants::kWildcard) 373 if (iter.key() == schema_constants::kWildcard)
374 continue; 374 continue;
375 if (!iter.value().GetAsDictionary(&subdict)) 375 if (!iter.value().GetAsDictionary(&subdict))
376 continue; 376 continue;
377 if (StartsWithASCII(iter.key(), schema_constants::kUpdateUrlPrefix, 377 if (base::StartsWithASCII(iter.key(), schema_constants::kUpdateUrlPrefix,
378 true)) { 378 true)) {
379 const std::string& update_url = 379 const std::string& update_url =
380 iter.key().substr(strlen(schema_constants::kUpdateUrlPrefix)); 380 iter.key().substr(strlen(schema_constants::kUpdateUrlPrefix));
381 if (!GURL(update_url).is_valid()) { 381 if (!GURL(update_url).is_valid()) {
382 LOG(WARNING) << "Invalid update URL: " << update_url << "."; 382 LOG(WARNING) << "Invalid update URL: " << update_url << ".";
383 continue; 383 continue;
384 } 384 }
385 internal::IndividualSettings* by_update_url = 385 internal::IndividualSettings* by_update_url =
386 AccessByUpdateUrl(update_url); 386 AccessByUpdateUrl(update_url);
387 if (!by_update_url->Parse( 387 if (!by_update_url->Parse(
388 subdict, internal::IndividualSettings::SCOPE_UPDATE_URL)) { 388 subdict, internal::IndividualSettings::SCOPE_UPDATE_URL)) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 content::BrowserContext* context) const { 490 content::BrowserContext* context) const {
491 return chrome::GetBrowserContextRedirectedInIncognito(context); 491 return chrome::GetBrowserContextRedirectedInIncognito(context);
492 } 492 }
493 493
494 void ExtensionManagementFactory::RegisterProfilePrefs( 494 void ExtensionManagementFactory::RegisterProfilePrefs(
495 user_prefs::PrefRegistrySyncable* user_prefs) { 495 user_prefs::PrefRegistrySyncable* user_prefs) {
496 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement); 496 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement);
497 } 497 }
498 498
499 } // namespace extensions 499 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698