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

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

Issue 1130353010: Remove deprecated ExtensionService::GetInstalledExtension() usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed if to iff 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
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | no next file » | 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return extension; 125 return extension;
126 } 126 }
127 if (include_mask & BLOCKED) { 127 if (include_mask & BLOCKED) {
128 const Extension* extension = blocked_extensions_.GetByID(lowercase_id); 128 const Extension* extension = blocked_extensions_.GetByID(lowercase_id);
129 if (extension) 129 if (extension)
130 return extension; 130 return extension;
131 } 131 }
132 return NULL; 132 return NULL;
133 } 133 }
134 134
135 const Extension* ExtensionRegistry::GetInstalledExtension(
136 const std::string& id) const {
137 return GetExtensionById(id, ExtensionRegistry::EVERYTHING);
138 }
139
135 bool ExtensionRegistry::AddEnabled( 140 bool ExtensionRegistry::AddEnabled(
136 const scoped_refptr<const Extension>& extension) { 141 const scoped_refptr<const Extension>& extension) {
137 return enabled_extensions_.Insert(extension); 142 return enabled_extensions_.Insert(extension);
138 } 143 }
139 144
140 bool ExtensionRegistry::RemoveEnabled(const std::string& id) { 145 bool ExtensionRegistry::RemoveEnabled(const std::string& id) {
141 return enabled_extensions_.Remove(id); 146 return enabled_extensions_.Remove(id);
142 } 147 }
143 148
144 bool ExtensionRegistry::AddDisabled( 149 bool ExtensionRegistry::AddDisabled(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 disabled_extensions_.set_modification_callback(callback); 195 disabled_extensions_.set_modification_callback(callback);
191 } 196 }
192 197
193 void ExtensionRegistry::Shutdown() { 198 void ExtensionRegistry::Shutdown() {
194 // Release references to all Extension objects in the sets. 199 // Release references to all Extension objects in the sets.
195 ClearAll(); 200 ClearAll();
196 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this)); 201 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this));
197 } 202 }
198 203
199 } // namespace extensions 204 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698