Chromium Code Reviews| 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_)); |
| } |
| } |