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

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: fix mac 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 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() {
10 }
11
12 InstallTracker::~InstallTracker() {
13 }
14
15 void InstallTracker::AddObserver(InstallObserver* observer) {
16 observers_.AddObserver(observer);
17 }
18
19 void InstallTracker::RemoveObserver(InstallObserver* observer) {
20 observers_.RemoveObserver(observer);
21 }
22
23 void InstallTracker::OnBeginExtensionInstall(
24 const std::string& extension_id,
25 const std::string& extension_name,
26 const gfx::ImageSkia& installing_icon,
27 bool is_app) {
28 FOR_EACH_OBSERVER(InstallObserver, observers_,
29 OnBeginExtensionInstall(extension_id,
30 extension_name,
31 installing_icon,
32 is_app));
33 }
34
35 void InstallTracker::OnDownloadProgress(const std::string& extension_id,
36 int percent_downloaded) {
37 FOR_EACH_OBSERVER(InstallObserver, observers_,
38 OnDownloadProgress(extension_id, percent_downloaded));
39 }
40
41 void InstallTracker::OnInstallFailure(
42 const std::string& extension_id) {
43 FOR_EACH_OBSERVER(InstallObserver, observers_,
44 OnInstallFailure(extension_id));
45 }
46
47 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_tracker.h ('k') | chrome/browser/extensions/install_tracker_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698