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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 2681203002: Add Browser::SkipCallBeforeUnload so that the browser windows can be closed regardless of beforeunl… (Closed)
Patch Set: refactor Created 3 years, 10 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) { 278 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) {
279 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 279 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
280 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() && 280 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() &&
281 !profile_->IsGuestSession() && !profile_->IsSupervised()) { 281 !profile_->IsGuestSession() && !profile_->IsSupervised()) {
282 BrowserList::CloseAllBrowsersWithProfile( 282 BrowserList::CloseAllBrowsersWithProfile(
283 profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess, 283 profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess,
284 base::Unretained(this), sign_out), 284 base::Unretained(this), sign_out),
285 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted, 285 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted,
286 base::Unretained(this))); 286 base::Unretained(this)),
287 false);
287 } else { 288 } else {
288 #else 289 #else
289 { 290 {
290 #endif 291 #endif
291 SigninClient::PreSignOut(sign_out); 292 SigninClient::PreSignOut(sign_out);
292 } 293 }
293 } 294 }
294 295
295 void ChromeSigninClient::OnErrorChanged() { 296 void ChromeSigninClient::OnErrorChanged() {
296 // Some tests don't have a ProfileManager. 297 // Some tests don't have a ProfileManager.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return; 458 return;
458 entry->LockForceSigninProfile(true); 459 entry->LockForceSigninProfile(true);
459 } 460 }
460 461
461 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) { 462 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) {
462 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 463 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
463 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL, 464 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL,
464 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); 465 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
465 #endif 466 #endif
466 } 467 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698