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

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: cr - remove delegate in UnloadController Created 3 years, 9 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
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/BUILD.gn » ('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 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (!password.empty() && profiles::IsLockAvailable(profile_)) 273 if (!password.empty() && profiles::IsLockAvailable(profile_))
274 LocalAuth::SetLocalAuthCredentials(profile_, password); 274 LocalAuth::SetLocalAuthCredentials(profile_, password);
275 #endif 275 #endif
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_,
284 base::Unretained(this), sign_out), 284 base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess,
285 base::Unretained(this), sign_out),
285 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted, 286 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted,
286 base::Unretained(this))); 287 base::Unretained(this)),
288 false);
287 } else { 289 } else {
288 #else 290 #else
289 { 291 {
290 #endif 292 #endif
291 SigninClient::PreSignOut(sign_out); 293 SigninClient::PreSignOut(sign_out);
292 } 294 }
293 } 295 }
294 296
295 void ChromeSigninClient::OnErrorChanged() { 297 void ChromeSigninClient::OnErrorChanged() {
296 // Some tests don't have a ProfileManager. 298 // Some tests don't have a ProfileManager.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return; 459 return;
458 entry->LockForceSigninProfile(true); 460 entry->LockForceSigninProfile(true);
459 } 461 }
460 462
461 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) { 463 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) {
462 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 464 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
463 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL, 465 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL,
464 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); 466 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
465 #endif 467 #endif
466 } 468 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698