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

Unified Diff: chrome/browser/protector/settings_change_global_error.cc

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/settings_change_global_error.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/protector/settings_change_global_error.cc
diff --git a/chrome/browser/protector/settings_change_global_error.cc b/chrome/browser/protector/settings_change_global_error.cc
index 4a7583c2aa574a8be6f90689d6709a04f24e4c92..74d8c833e9174e8bf5b868b03b55cc797b282361 100644
--- a/chrome/browser/protector/settings_change_global_error.cc
+++ b/chrome/browser/protector/settings_change_global_error.cc
@@ -10,6 +10,7 @@
#include "base/stl_util.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/protector/base_setting_change.h"
#include "chrome/browser/protector/settings_change_global_error_delegate.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/global_error_service.h"
@@ -103,8 +104,6 @@ void SettingsChangeGlobalError::BubbleViewCancelButtonPressed() {
void SettingsChangeGlobalError::RemoveFromProfile() {
if (profile_)
GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveGlobalError(this);
- if (!closed_by_button_)
- delegate_->OnDecisionTimeout();
delegate_->OnRemovedFromProfile();
}
@@ -113,7 +112,7 @@ void SettingsChangeGlobalError::BubbleViewDidClose() {
if (!closed_by_button_) {
BrowserThread::PostDelayedTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&SettingsChangeGlobalError::RemoveFromProfile,
+ base::Bind(&SettingsChangeGlobalError::OnInactiveTimeout,
weak_factory_.GetWeakPtr()),
kMenuItemDisplayPeriodMs);
} else {
@@ -148,4 +147,9 @@ void SettingsChangeGlobalError::Show() {
ShowBubbleView(browser_);
}
+void SettingsChangeGlobalError::OnInactiveTimeout() {
+ delegate_->OnDecisionTimeout();
+ RemoveFromProfile();
+}
+
} // namespace protector
« no previous file with comments | « chrome/browser/protector/settings_change_global_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698