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

Side by Side Diff: chrome/browser/protector/settings_change_global_error.cc

Issue 8844003: Send notifications to off-the-record profile about error bubble being added/removed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/global_error_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/protector/settings_change_global_error.h" 5 #include "chrome/browser/protector/settings_change_global_error.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
149 profile_ = profile; 149 profile_ = profile;
150 GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(this); 150 GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(this);
151 Show(); 151 Show();
152 } 152 }
153 153
154 void SettingsChangeGlobalError::Show() { 154 void SettingsChangeGlobalError::Show() {
155 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 155 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
156 DCHECK(profile_); 156 DCHECK(profile_);
157 browser_ = BrowserList::GetLastActiveWithProfile(profile_); 157 browser_ = BrowserList::GetLastActiveWithProfile(profile_);
158 if (!browser_ && profile_->HasOffTheRecordProfile()) {
159 browser_ = BrowserList::GetLastActiveWithProfile(
160 profile_->GetOffTheRecordProfile());
161 }
158 if (browser_) 162 if (browser_)
159 ShowBubbleView(browser_); 163 ShowBubbleView(browser_);
160 } 164 }
161 165
162 void SettingsChangeGlobalError::OnInactiveTimeout() { 166 void SettingsChangeGlobalError::OnInactiveTimeout() {
163 delegate_->OnDecisionTimeout(); 167 delegate_->OnDecisionTimeout();
164 RemoveFromProfile(); 168 RemoveFromProfile();
165 } 169 }
166 170
167 } // namespace protector 171 } // namespace protector
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/global_error_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698