| Index: chrome/browser/background_application_list_model.cc
|
| ===================================================================
|
| --- chrome/browser/background_application_list_model.cc (revision 86295)
|
| +++ 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();
|
|
|
| @@ -64,6 +65,7 @@
|
| const Extension* extension_;
|
| scoped_ptr<SkBitmap> icon_;
|
| BackgroundApplicationListModel* model_;
|
| + Profile* profile_;
|
| ImageLoadingTracker tracker_;
|
| };
|
|
|
| @@ -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_->SendApplicationDataChangedNotifications(extension_);
|
| }
|
|
|
| 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);
|
| }
|
| @@ -263,9 +268,10 @@
|
| }
|
| }
|
|
|
| -void BackgroundApplicationListModel::OnApplicationDataChanged(
|
| +void BackgroundApplicationListModel::SendApplicationDataChangedNotifications(
|
| const Extension* extension) {
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnApplicationDataChanged(extension));
|
| + 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_));
|
| }
|
| }
|
|
|