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

Unified Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 2712883005: Sign out profile when local_state file has been changed. (Closed)
Patch Set: Merge from master 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698