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

Unified Diff: chrome/browser/background_application_list_model.cc

Issue 6914021: Modifying the BackgroundModeManager to handle multiple profiles. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/background_application_list_model.cc
===================================================================
--- chrome/browser/background_application_list_model.cc (revision 85413)
+++ chrome/browser/background_application_list_model.cc (working copy)
@@ -48,7 +48,8 @@
: public ImageLoadingTracker::Observer {
public:
Application(BackgroundApplicationListModel* model,
- const Extension* an_extension);
+ const Extension* an_extension,
+ Profile* profile_);
virtual ~Application();
@@ -65,6 +66,7 @@
scoped_ptr<SkBitmap> icon_;
BackgroundApplicationListModel* model_;
ImageLoadingTracker tracker_;
+ Profile* profile_;
Andrew T Wilson (Slow) 2011/05/20 00:22:09 See my previous comment - do we really need to tra
rpetterson 2011/05/20 05:53:17 It doesn't pass back just to the BackgroundApplica
Andrew T Wilson (Slow) 2011/05/20 16:52:45 But BackgroundApplicationListModel::Application ne
};
namespace {
@@ -96,11 +98,12 @@
void
BackgroundApplicationListModel::Observer::OnApplicationDataChanged(
- const Extension* extension) {
+ const Extension* extension, Profile* profile) {
}
void
-BackgroundApplicationListModel::Observer::OnApplicationListChanged() {
+BackgroundApplicationListModel::Observer::OnApplicationListChanged(
+ Profile* profile) {
}
BackgroundApplicationListModel::Observer::~Observer() {
@@ -111,10 +114,12 @@
BackgroundApplicationListModel::Application::Application(
BackgroundApplicationListModel* model,
- const Extension* extension)
+ const Extension* extension,
+ Profile* profile)
: extension_(extension),
icon_(NULL),
model_(model),
+ profile_(profile),
ALLOW_THIS_IN_INITIALIZER_LIST(tracker_(this)) {
}
@@ -125,7 +130,7 @@
if (!image)
return;
icon_.reset(new SkBitmap(*image));
- model_->OnApplicationDataChanged(extension_);
+ model_->OnApplicationDataChanged(extension_, profile_);
}
void BackgroundApplicationListModel::Application::RequestIcon(
@@ -174,7 +179,7 @@
<< " exceeded. Ignoring.";
return;
}
- application = new Application(this, extension);
+ application = new Application(this, extension, profile_);
applications_[extension->id()] = application;
application->RequestIcon(Extension::EXTENSION_ICON_BITTY);
}
@@ -264,8 +269,9 @@
}
void BackgroundApplicationListModel::OnApplicationDataChanged(
- const Extension* extension) {
- FOR_EACH_OBSERVER(Observer, observers_, OnApplicationDataChanged(extension));
+ const Extension* extension, Profile* profile) {
+ FOR_EACH_OBSERVER(Observer, observers_, OnApplicationDataChanged(extension,
+ profile));
}
void BackgroundApplicationListModel::OnExtensionLoaded(Extension* extension) {
@@ -310,6 +316,6 @@
}
if (old_cursor != extensions_.end() || new_cursor != extensions.end()) {
extensions_ = extensions;
- FOR_EACH_OBSERVER(Observer, observers_, OnApplicationListChanged());
+ FOR_EACH_OBSERVER(Observer, observers_, OnApplicationListChanged(profile_));
}
}

Powered by Google App Engine
This is Rietveld 408576698