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

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

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 CHECK(extension); 103 CHECK(extension);
104 DCHECK(!GenerateInstalledExtensionsSet()->Contains(extension->id())); 104 DCHECK(!GenerateInstalledExtensionsSet()->Contains(extension->id()));
105 FOR_EACH_OBSERVER( 105 FOR_EACH_OBSERVER(
106 ExtensionRegistryObserver, 106 ExtensionRegistryObserver,
107 observers_, 107 observers_,
108 OnExtensionUninstalled(browser_context_, extension, reason)); 108 OnExtensionUninstalled(browser_context_, extension, reason));
109 } 109 }
110 110
111 const Extension* ExtensionRegistry::GetExtensionById(const std::string& id, 111 const Extension* ExtensionRegistry::GetExtensionById(const std::string& id,
112 int include_mask) const { 112 int include_mask) const {
113 std::string lowercase_id = base::StringToLowerASCII(id); 113 std::string lowercase_id = base::ToLowerASCII(id);
114 if (include_mask & ENABLED) { 114 if (include_mask & ENABLED) {
115 const Extension* extension = enabled_extensions_.GetByID(lowercase_id); 115 const Extension* extension = enabled_extensions_.GetByID(lowercase_id);
116 if (extension) 116 if (extension)
117 return extension; 117 return extension;
118 } 118 }
119 if (include_mask & DISABLED) { 119 if (include_mask & DISABLED) {
120 const Extension* extension = disabled_extensions_.GetByID(lowercase_id); 120 const Extension* extension = disabled_extensions_.GetByID(lowercase_id);
121 if (extension) 121 if (extension)
122 return extension; 122 return extension;
123 } 123 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 disabled_extensions_.set_modification_callback(callback); 216 disabled_extensions_.set_modification_callback(callback);
217 } 217 }
218 218
219 void ExtensionRegistry::Shutdown() { 219 void ExtensionRegistry::Shutdown() {
220 // Release references to all Extension objects in the sets. 220 // Release references to all Extension objects in the sets.
221 ClearAll(); 221 ClearAll();
222 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this)); 222 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this));
223 } 223 }
224 224
225 } // namespace extensions 225 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.cc ('k') | extensions/browser/extension_throttle_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698