Index: chrome/browser/protector/protector.h |
=================================================================== |
--- chrome/browser/protector/protector.h (revision 110688) |
+++ chrome/browser/protector/protector.h (working copy) |
@@ -21,8 +21,9 @@ |
class SettingsChangeGlobalError; |
-// Presents a SettingChange to user and handles possible user actions. |
-// Deletes itself after a user action is taken or timeout expires. |
+// Accumulates settings changes and shows them altogether to user. |
+// Deletes itself when changes are shown to the user and some action is taken |
+// or timeout expires. |
class Protector : public SettingsChangeGlobalErrorDelegate { |
public: |
explicit Protector(Profile* profile); |
@@ -36,12 +37,12 @@ |
TemplateURLService* GetTemplateURLService(); |
// Shows global error about the specified change. Ownership of the change |
- // is passed to the GlobalError object. |
+ // is passed to the error object. |
void ShowChange(SettingChange* change); |
// SettingsChangeGlobalErrorDelegate implementation. |
- virtual void OnApplyChange() OVERRIDE; |
- virtual void OnDiscardChange() OVERRIDE; |
+ virtual void OnApplyChanges() OVERRIDE; |
+ virtual void OnDiscardChanges() OVERRIDE; |
virtual void OnDecisionTimeout() OVERRIDE; |
virtual void OnRemovedFromProfile() OVERRIDE; |
@@ -51,10 +52,9 @@ |
// The object can only be allocated and destroyed on heap. |
virtual ~Protector(); |
- // Performs the initial action on settings change and shows it. This is run |
- // asynchronously on UI thread because |ShowChange| may be called in the |
- // middle of some operations on settings that have changed. |
- void InitAndShowChange(SettingChange* change); |
+ // Common handler for error delegate handlers. Calls the specified method |
+ // on each change we showed error for. |
+ void OnChangesAction(SettingChangeAction action); |
// Pointer to error bubble controller. Indicates if we're showing change |
// notification to user. Owns itself. |