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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 235943011: Add a checkbox on stop-sync dialog to allow user to choose whether to delete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 8 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/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 575afad8f75a030a5f3b525fcf9d8954a1b6df87..d3e6f69219a97d1fad116575ae718db47d342399 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -228,6 +228,8 @@ void SyncSetupHandler::GetStaticLocalizedValues(
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
base::ASCIIToUTF16(google_util::StringAppendGoogleLocaleParam(
chrome::kSyncGoogleDashboardURL))));
+ localized_strings->SetString("deleteProfileLabel",
+ l10n_util::GetStringUTF16(IDS_SYNC_STOP_DELETE_PROFILE_LABEL));
localized_strings->SetString("stopSyncingTitle",
l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_DIALOG_TITLE));
localized_strings->SetString("stopSyncingConfirm",
@@ -779,6 +781,12 @@ void SyncSetupHandler::HandleStopSyncing(const base::ListValue* args) {
if (GetSyncService())
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
SigninManagerFactory::GetForProfile(GetProfile())->SignOut();
+
+ bool delete_profile = false;
+ if (args->GetBoolean(0, &delete_profile) && delete_profile) {
+ web_ui()->CallJavascriptFunction(
+ "BrowserOptions.deleteCurrentProfile");
+ }
}
#endif

Powered by Google App Engine
This is Rietveld 408576698