| Index: chrome/browser/signin/chrome_signin_client.cc
|
| diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
|
| index 15c44ce177e892798d9c223b952594079ae2840d..4806406faad189892af2db9379d417604dee470b 100644
|
| --- a/chrome/browser/signin/chrome_signin_client.cc
|
| +++ b/chrome/browser/signin/chrome_signin_client.cc
|
| @@ -275,20 +275,27 @@ void ChromeSigninClient::PostSignedIn(const std::string& account_id,
|
| #endif
|
| }
|
|
|
| -void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) {
|
| +void ChromeSigninClient::PreSignOut(
|
| + const base::Callback<void()>& sign_out,
|
| + signin_metrics::ProfileSignout signout_source_metric) {
|
| #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
|
| if (is_force_signin_enabled_ && !profile_->IsSystemProfile() &&
|
| !profile_->IsGuestSession() && !profile_->IsSupervised()) {
|
| + // TODO(zmin): force window closing based on the reason of sign-out.
|
| + // This will be updated after force window closing CL is commited.
|
| +
|
| + // User can't abort the window closing unless user sign out manually.
|
| BrowserList::CloseAllBrowsersWithProfile(
|
| - profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess,
|
| - base::Unretained(this), sign_out),
|
| + profile_,
|
| + base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess,
|
| + base::Unretained(this), sign_out, signout_source_metric),
|
| base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted,
|
| base::Unretained(this)));
|
| } else {
|
| #else
|
| {
|
| #endif
|
| - SigninClient::PreSignOut(sign_out);
|
| + SigninClient::PreSignOut(sign_out, signout_source_metric);
|
| }
|
| }
|
|
|
| @@ -429,8 +436,9 @@ void ChromeSigninClient::AfterCredentialsCopied() {
|
|
|
| void ChromeSigninClient::OnCloseBrowsersSuccess(
|
| const base::Callback<void()>& sign_out,
|
| + const signin_metrics::ProfileSignout signout_source_metric,
|
| const base::FilePath& profile_path) {
|
| - SigninClient::PreSignOut(sign_out);
|
| + SigninClient::PreSignOut(sign_out, signout_source_metric);
|
|
|
| LockForceSigninProfile(profile_path);
|
| // After sign out, lock the profile and show UserManager if necessary.
|
|
|