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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 observer.OnExtensionLoaded(browser_context_, extension); 55 observer.OnExtensionLoaded(browser_context_, extension);
56 } 56 }
57 57
58 void ExtensionRegistry::TriggerOnReady(const Extension* extension) { 58 void ExtensionRegistry::TriggerOnReady(const Extension* extension) {
59 CHECK(extension); 59 CHECK(extension);
60 DCHECK(enabled_extensions_.Contains(extension->id())); 60 DCHECK(enabled_extensions_.Contains(extension->id()));
61 for (auto& observer : observers_) 61 for (auto& observer : observers_)
62 observer.OnExtensionReady(browser_context_, extension); 62 observer.OnExtensionReady(browser_context_, extension);
63 } 63 }
64 64
65 void ExtensionRegistry::TriggerOnUnloaded( 65 void ExtensionRegistry::TriggerOnUnloaded(const Extension* extension,
66 const Extension* extension, 66 UnloadedExtensionReason reason) {
67 UnloadedExtensionInfo::Reason reason) {
68 CHECK(extension); 67 CHECK(extension);
69 DCHECK(!enabled_extensions_.Contains(extension->id())); 68 DCHECK(!enabled_extensions_.Contains(extension->id()));
70 for (auto& observer : observers_) 69 for (auto& observer : observers_)
71 observer.OnExtensionUnloaded(browser_context_, extension, reason); 70 observer.OnExtensionUnloaded(browser_context_, extension, reason);
72 } 71 }
73 72
74 void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension, 73 void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension,
75 bool is_update, 74 bool is_update,
76 const std::string& old_name) { 75 const std::string& old_name) {
77 CHECK(extension); 76 CHECK(extension);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 202 }
204 203
205 void ExtensionRegistry::Shutdown() { 204 void ExtensionRegistry::Shutdown() {
206 // Release references to all Extension objects in the sets. 205 // Release references to all Extension objects in the sets.
207 ClearAll(); 206 ClearAll();
208 for (auto& observer : observers_) 207 for (auto& observer : observers_)
209 observer.OnShutdown(this); 208 observer.OnShutdown(this);
210 } 209 }
211 210
212 } // namespace extensions 211 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | extensions/browser/extension_registry_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698