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

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

Powered by Google App Engine
This is Rietveld 408576698