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

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
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/signin_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a30291d3fc6b45f83b40b55995f67af4c22ff94..584775e612d20c5b5389dda0c5ead00cf3804975 100644
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -275,14 +275,20 @@ 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),
+ base::Unretained(this), sign_out, signout_source_metric),
base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted,
base::Unretained(this)),
false);
@@ -290,7 +296,7 @@ void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) {
#else
{
#endif
- SigninClient::PreSignOut(sign_out);
+ SigninClient::PreSignOut(sign_out, signout_source_metric);
}
}
@@ -431,8 +437,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.
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/signin_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698