Chromium Code Reviews| Index: chrome/browser/protector/settings_change_global_error.h |
| diff --git a/chrome/browser/protector/settings_change_global_error.h b/chrome/browser/protector/settings_change_global_error.h |
| index ff0064f245ace9bff279e5dadbf1811cbe9cdba5..55c10fa1ff0ba311e551436c2eff6787e4081164 100644 |
| --- a/chrome/browser/protector/settings_change_global_error.h |
| +++ b/chrome/browser/protector/settings_change_global_error.h |
| @@ -18,13 +18,15 @@ class Profile; |
| namespace protector { |
| +class BaseSettingChange; |
| class SettingsChangeGlobalErrorDelegate; |
| // Global error about unwanted settings changes. |
| class SettingsChangeGlobalError : public GlobalError { |
| public: |
| - // Creates new global error about setting changes |change| and takes |
| - // ownership over it. Uses |delegate| to notify about user decision. |
| + // Creates new global error about setting changes |change| which must not be |
| + // deleted until |OnRemovedFromProfile| is called. Uses |delegate| to notify |
|
whywhat
2011/11/21 14:51:21
Did you mean RemoveFromProfile?
Ivan Korotkov
2011/11/21 15:27:38
I meant |Delegate::OnRemovedFromProfile|
|
| + // about user decision. |
| SettingsChangeGlobalError(BaseSettingChange* change, |
| SettingsChangeGlobalErrorDelegate* delegate); |
| virtual ~SettingsChangeGlobalError(); |
| @@ -33,11 +35,12 @@ class SettingsChangeGlobalError : public GlobalError { |
| // Can be called from any thread. |
| void ShowForProfile(Profile* profile); |
| + // Removes global error from its profile. |
| + void RemoveFromProfile(); |
| + |
| // Browser that the bubble has been last time shown for. |
| Browser* browser() const { return browser_; } |
| - BaseSettingChange* mutable_change() { return change_.get(); } |
| - |
| // GlobalError implementation. |
| virtual bool HasBadge() OVERRIDE; |
| virtual bool HasMenuItem() OVERRIDE; |
| @@ -61,11 +64,12 @@ class SettingsChangeGlobalError : public GlobalError { |
| // Displays global error bubble. Must be called on the UI thread. |
| void Show(); |
| - // Removes global error from its profile and deletes |this| later. |
| - void RemoveFromProfile(); |
| + // Called when the wrench menu item has been displayed for enough time |
| + // without user interaction. |
| + void OnInactiveTimeout(); |
| // Change to show. |
| - scoped_ptr<BaseSettingChange> change_; |
| + BaseSettingChange* change_; |
| // Delegate to notify about user actions. |
| SettingsChangeGlobalErrorDelegate* delegate_; |