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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_service.cc

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/declarative/rules_registry_service.h" 5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 void RulesRegistryService::OnExtensionUnloaded( 207 void RulesRegistryService::OnExtensionUnloaded(
208 content::BrowserContext* browser_context, 208 content::BrowserContext* browser_context,
209 const Extension* extension, 209 const Extension* extension,
210 UnloadedExtensionInfo::Reason reason) { 210 UnloadedExtensionInfo::Reason reason) {
211 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUnloaded, extension->id()); 211 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUnloaded, extension->id());
212 } 212 }
213 213
214 void RulesRegistryService::OnExtensionUninstalled( 214 void RulesRegistryService::OnExtensionUninstalled(
215 content::BrowserContext* browser_context, 215 content::BrowserContext* browser_context,
216 const Extension* extension) { 216 const Extension* extension,
217 extensions::UninstallReason reason) {
217 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUninstalled, 218 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUninstalled,
218 extension->id()); 219 extension->id());
219 } 220 }
220 221
221 void RulesRegistryService::Observe( 222 void RulesRegistryService::Observe(
222 int type, 223 int type,
223 const content::NotificationSource& source, 224 const content::NotificationSource& source,
224 const content::NotificationDetails& details) { 225 const content::NotificationDetails& details) {
225 DCHECK_EQ(content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, type); 226 DCHECK_EQ(content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, type);
226 227
227 content::RenderProcessHost* process = 228 content::RenderProcessHost* process =
228 content::Source<content::RenderProcessHost>(source).ptr(); 229 content::Source<content::RenderProcessHost>(source).ptr();
229 RemoveWebViewRulesRegistries(process->GetID()); 230 RemoveWebViewRulesRegistries(process->GetID());
230 } 231 }
231 232
232 } // namespace extensions 233 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698