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

Unified Diff: chrome/browser/protector/protector.h

Issue 8612002: Protector bubble cancels itself if user changes default search engine manually. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/protector/default_search_provider_change.cc ('k') | chrome/browser/protector/protector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/protector/protector.h
diff --git a/chrome/browser/protector/protector.h b/chrome/browser/protector/protector.h
index 85ac9ae7919b2acc9ae03926ac8d5a0236adbb0e..fe9f6544a7b1985ca7f4fda877748b103d4a6650 100644
--- a/chrome/browser/protector/protector.h
+++ b/chrome/browser/protector/protector.h
@@ -31,14 +31,16 @@ class Protector : public SettingsChangeGlobalErrorDelegate {
// bubble for.
void OpenTab(const GURL& url);
- // Returns TemplateURLService for the profile we've shown error bubble
- // for.
+ // Returns TemplateURLService for the profile we've shown error bubble for.
TemplateURLService* GetTemplateURLService();
- // Shows global error about the specified change. Ownership of the change
- // is passed to the GlobalError object.
+ // Shows global error about the specified change. Owns |change|.
void ShowChange(BaseSettingChange* change);
+ // Silently discards any change previously shown (without calling Discard),
+ // removes global error and deletes itself.
+ void DismissChange();
+
// SettingsChangeGlobalErrorDelegate implementation.
virtual void OnApplyChange() OVERRIDE;
virtual void OnDiscardChange() OVERRIDE;
@@ -53,13 +55,17 @@ class Protector : public SettingsChangeGlobalErrorDelegate {
// 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.
+ // middle of some operations on settings that have changed. If the initial
+ // action fails, deletes itself.
void InitAndShowChange(BaseSettingChange* change);
// Pointer to error bubble controller. Indicates if we're showing change
- // notification to user. Owns itself.
+ // notification to user.
scoped_ptr<SettingsChangeGlobalError> error_;
+ // Setting change which we're showing.
+ scoped_ptr<BaseSettingChange> change_;
+
// Profile which settings we are protecting.
Profile* profile_;
« no previous file with comments | « chrome/browser/protector/default_search_provider_change.cc ('k') | chrome/browser/protector/protector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698