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

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

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, Devlin review. Created 5 years 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 UnloadedExtensionInfo::Reason reason) { 68 UnloadedExtensionInfo::Reason reason) {
69 CHECK(extension); 69 CHECK(extension);
70 DCHECK(!enabled_extensions_.Contains(extension->id())); 70 DCHECK(!enabled_extensions_.Contains(extension->id()));
71 FOR_EACH_OBSERVER(ExtensionRegistryObserver, 71 FOR_EACH_OBSERVER(ExtensionRegistryObserver,
72 observers_, 72 observers_,
73 OnExtensionUnloaded(browser_context_, extension, reason)); 73 OnExtensionUnloaded(browser_context_, extension, reason));
74 } 74 }
75 75
76 void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension, 76 void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension,
77 bool is_update, 77 bool is_update,
78 bool from_ephemeral,
79 const std::string& old_name) { 78 const std::string& old_name) {
80 CHECK(extension); 79 CHECK(extension);
81 DCHECK_EQ(is_update, 80 DCHECK_EQ(is_update,
82 GenerateInstalledExtensionsSet()->Contains(extension->id())); 81 GenerateInstalledExtensionsSet()->Contains(extension->id()));
83 DCHECK_EQ(is_update, !old_name.empty()); 82 DCHECK_EQ(is_update, !old_name.empty());
84 FOR_EACH_OBSERVER( 83 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_,
85 ExtensionRegistryObserver, 84 OnExtensionWillBeInstalled(browser_context_, extension,
86 observers_, 85 is_update, old_name));
87 OnExtensionWillBeInstalled(
88 browser_context_, extension, is_update, from_ephemeral, old_name));
89 } 86 }
90 87
91 void ExtensionRegistry::TriggerOnInstalled(const Extension* extension, 88 void ExtensionRegistry::TriggerOnInstalled(const Extension* extension,
92 bool is_update) { 89 bool is_update) {
93 CHECK(extension); 90 CHECK(extension);
94 DCHECK(GenerateInstalledExtensionsSet()->Contains(extension->id())); 91 DCHECK(GenerateInstalledExtensionsSet()->Contains(extension->id()));
95 FOR_EACH_OBSERVER(ExtensionRegistryObserver, 92 FOR_EACH_OBSERVER(ExtensionRegistryObserver,
96 observers_, 93 observers_,
97 OnExtensionInstalled( 94 OnExtensionInstalled(
98 browser_context_, extension, is_update)); 95 browser_context_, extension, is_update));
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 ready_extensions_.Clear(); 208 ready_extensions_.Clear();
212 } 209 }
213 210
214 void ExtensionRegistry::Shutdown() { 211 void ExtensionRegistry::Shutdown() {
215 // Release references to all Extension objects in the sets. 212 // Release references to all Extension objects in the sets.
216 ClearAll(); 213 ClearAll();
217 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this)); 214 FOR_EACH_OBSERVER(ExtensionRegistryObserver, observers_, OnShutdown(this));
218 } 215 }
219 216
220 } // namespace extensions 217 } // 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