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

Side by Side Diff: chrome/browser/extensions/install_tracker.cc

Issue 298023009: Remove InstallTracker's extension load, unload observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "chrome/browser/extensions/install_tracker.h" 5 #include "chrome/browser/extensions/install_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/install_tracker_factory.h" 9 #include "chrome/browser/extensions/install_tracker_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 *content::Details<const std::string>(details).ptr()); 121 *content::Details<const std::string>(details).ptr());
122 FOR_EACH_OBSERVER(InstallObserver, observers_, 122 FOR_EACH_OBSERVER(InstallObserver, observers_,
123 OnAppInstalledToAppList(extension_id)); 123 OnAppInstalledToAppList(extension_id));
124 break; 124 break;
125 } 125 }
126 default: 126 default:
127 NOTREACHED(); 127 NOTREACHED();
128 } 128 }
129 } 129 }
130 130
131 void InstallTracker::OnExtensionLoaded(content::BrowserContext* browser_context,
132 const Extension* extension) {
133 FOR_EACH_OBSERVER(InstallObserver, observers_, OnExtensionLoaded(extension));
134 }
135
136 void InstallTracker::OnExtensionUnloaded(
137 content::BrowserContext* browser_context,
138 const Extension* extension,
139 UnloadedExtensionInfo::Reason reason) {
140 FOR_EACH_OBSERVER(
141 InstallObserver, observers_, OnExtensionUnloaded(extension));
142 }
143
144 void InstallTracker::OnExtensionWillBeInstalled( 131 void InstallTracker::OnExtensionWillBeInstalled(
145 content::BrowserContext* browser_context, 132 content::BrowserContext* browser_context,
146 const Extension* extension, 133 const Extension* extension,
147 bool is_update, 134 bool is_update,
148 bool from_ephemeral, 135 bool from_ephemeral,
149 const std::string& old_name) { 136 const std::string& old_name) {
150 FOR_EACH_OBSERVER( 137 FOR_EACH_OBSERVER(
151 InstallObserver, observers_, OnExtensionInstalled(extension)); 138 InstallObserver, observers_, OnExtensionInstalled(extension));
152 } 139 }
153 140
154 void InstallTracker::OnAppsReordered() { 141 void InstallTracker::OnAppsReordered() {
155 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered()); 142 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered());
156 } 143 }
157 144
158 } // namespace extensions 145 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698