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

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

Issue 12298015: Change NotifyAppList*() functions into observers on a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/install_tracker.h"
6
7 namespace extensions {
8
9 InstallTracker::InstallTracker(Profile* profile)
10 : profile_(profile) {
11 }
12
13 InstallTracker::~InstallTracker() {
14 }
15
16 void InstallTracker::OnBeginExtensionInstall(
17 const std::string& extension_id,
18 const std::string& extension_name,
19 const gfx::ImageSkia& installing_icon,
20 bool is_app) {
21 FOR_EACH_OBSERVER(InstallObserver, observers_,
22 OnBeginExtensionInstall(extension_id,
23 extension_name,
24 installing_icon,
25 is_app));
26 }
27
28 void InstallTracker::OnDownloadProgress(const std::string& extension_id,
29 int percent_downloaded) {
30 FOR_EACH_OBSERVER(InstallObserver, observers_,
31 OnDownloadProgress(extension_id, percent_downloaded));
32 }
33
34 void InstallTracker::OnInstallFailure(
35 const std::string& extension_id) {
36 FOR_EACH_OBSERVER(InstallObserver, observers_,
37 OnInstallFailure(extension_id));
38 }
39
40 void InstallTracker::AddObserver(InstallObserver* observer) {
41 observers_.AddObserver(observer);
42 }
43
44 void InstallTracker::RemoveObserver(InstallObserver* observer) {
45 observers_.RemoveObserver(observer);
46 }
47
48 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698