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

Side by Side Diff: extensions/browser/extension_registry.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « crypto/symmetric_key_unittest.cc ('k') | extensions/common/csp_validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "extensions/browser/extension_registry.h" 5 #include "extensions/browser/extension_registry.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "extensions/browser/extension_registry_factory.h" 8 #include "extensions/browser/extension_registry_factory.h"
9 #include "extensions/browser/extension_registry_observer.h" 9 #include "extensions/browser/extension_registry_observer.h"
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 UninstallReason reason) { 80 UninstallReason reason) {
81 DCHECK(!GenerateInstalledExtensionsSet()->Contains(extension->id())); 81 DCHECK(!GenerateInstalledExtensionsSet()->Contains(extension->id()));
82 FOR_EACH_OBSERVER( 82 FOR_EACH_OBSERVER(
83 ExtensionRegistryObserver, 83 ExtensionRegistryObserver,
84 observers_, 84 observers_,
85 OnExtensionUninstalled(browser_context_, extension, reason)); 85 OnExtensionUninstalled(browser_context_, extension, reason));
86 } 86 }
87 87
88 const Extension* ExtensionRegistry::GetExtensionById(const std::string& id, 88 const Extension* ExtensionRegistry::GetExtensionById(const std::string& id,
89 int include_mask) const { 89 int include_mask) const {
90 std::string lowercase_id = StringToLowerASCII(id); 90 std::string lowercase_id = base::StringToLowerASCII(id);
91 if (include_mask & ENABLED) { 91 if (include_mask & ENABLED) {
92 const Extension* extension = enabled_extensions_.GetByID(lowercase_id); 92 const Extension* extension = enabled_extensions_.GetByID(lowercase_id);
93 if (extension) 93 if (extension)
94 return extension; 94 return extension;
95 } 95 }
96 if (include_mask & DISABLED) { 96 if (include_mask & DISABLED) {
97 const Extension* extension = disabled_extensions_.GetByID(lowercase_id); 97 const Extension* extension = disabled_extensions_.GetByID(lowercase_id);
98 if (extension) 98 if (extension)
99 return extension; 99 return extension;
100 } 100 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 disabled_extensions_.set_modification_callback(callback); 159 disabled_extensions_.set_modification_callback(callback);
160 } 160 }
161 161
162 void ExtensionRegistry::Shutdown() { 162 void ExtensionRegistry::Shutdown() {
163 // Release references to all Extension objects in the sets. 163 // Release references to all Extension objects in the sets.
164 ClearAll(); 164 ClearAll();
165 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this)); 165 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this));
166 } 166 }
167 167
168 } // namespace extensions 168 } // namespace extensions
OLDNEW
« no previous file with comments | « crypto/symmetric_key_unittest.cc ('k') | extensions/common/csp_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698