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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 2102803002: Settings People Revamp: Add special Disconnect logic for domain profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make behavior same as Options Created 4 years, 6 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/ui/webui/settings/people_handler.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 22ac4b4dc8861ea164e278a303df303edbda4655..6eaeb244d5086611b41a3fe53d2a2fc647471091 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -512,19 +512,23 @@ void PeopleHandler::HandleStartSignin(const base::ListValue* args) {
}
void PeopleHandler::HandleStopSyncing(const base::ListValue* args) {
- if (GetSyncService())
- ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
-
bool delete_profile = false;
args->GetBoolean(0, &delete_profile);
- signin_metrics::SignoutDelete delete_metric =
- delete_profile ? signin_metrics::SignoutDelete::DELETED
- : signin_metrics::SignoutDelete::KEEPING;
- SigninManagerFactory::GetForProfile(profile_)
- ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric);
+ bool domain_managed_profile = false;
+ args->GetBoolean(0, &domain_managed_profile);
+
+ if (!domain_managed_profile) {
dpapad 2016/06/28 22:17:22 Same question here. Why are we trusting JS for thi
tommycli 2016/06/28 23:26:00 Done. It was the way before just because I was cop
+ if (GetSyncService())
+ ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
+
+ signin_metrics::SignoutDelete delete_metric =
+ delete_profile ? signin_metrics::SignoutDelete::DELETED
+ : signin_metrics::SignoutDelete::KEEPING;
+ SigninManagerFactory::GetForProfile(profile_)
+ ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric);
+ }
if (delete_profile) {
- // Do as BrowserOptionsHandler::DeleteProfile().
webui::DeleteProfileAtPath(profile_->GetPath(),
web_ui(),
ProfileMetrics::DELETE_PROFILE_SETTINGS);

Powered by Google App Engine
This is Rietveld 408576698