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

Side by Side Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Issue 2800683008: Sync confirmation: change "Settings" link to checkbox (Closed)
Patch Set: tests Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" 5 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 10 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 20 matching lines...) Expand all
31 source->AddBoolean("isSyncAllowed", is_sync_allowed); 31 source->AddBoolean("isSyncAllowed", is_sync_allowed);
32 32
33 source->AddLocalizedString("syncConfirmationChromeSyncTitle", 33 source->AddLocalizedString("syncConfirmationChromeSyncTitle",
34 IDS_SYNC_CONFIRMATION_CHROME_SYNC_TITLE); 34 IDS_SYNC_CONFIRMATION_CHROME_SYNC_TITLE);
35 source->AddLocalizedString("syncConfirmationChromeSyncBody", 35 source->AddLocalizedString("syncConfirmationChromeSyncBody",
36 IDS_SYNC_CONFIRMATION_CHROME_SYNC_MESSAGE); 36 IDS_SYNC_CONFIRMATION_CHROME_SYNC_MESSAGE);
37 source->AddLocalizedString("syncConfirmationPersonalizeServicesTitle", 37 source->AddLocalizedString("syncConfirmationPersonalizeServicesTitle",
38 IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_TITLE); 38 IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_TITLE);
39 source->AddLocalizedString("syncConfirmationPersonalizeServicesBody", 39 source->AddLocalizedString("syncConfirmationPersonalizeServicesBody",
40 IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_BODY); 40 IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_BODY);
41 source->AddLocalizedString("syncConfirmationSyncSettingsLinkBody", 41 source->AddLocalizedString("syncConfirmationSyncSettingsLabel",
42 IDS_SYNC_CONFIRMATION_SYNC_SETTINGS_LINK_BODY); 42 IDS_SYNC_CONFIRMATION_SYNC_SETTINGS_LABEL);
43 source->AddLocalizedString("syncDisabledConfirmationDetails", 43 source->AddLocalizedString("syncDisabledConfirmationDetails",
44 IDS_SYNC_DISABLED_CONFIRMATION_DETAILS); 44 IDS_SYNC_DISABLED_CONFIRMATION_DETAILS);
45 45
46 int title_ids = IDS_SYNC_CONFIRMATION_TITLE; 46 int title_ids = IDS_SYNC_CONFIRMATION_TITLE;
47 int confirm_button_ids = IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL; 47 int confirm_button_ids = IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL;
48 int undo_button_ids = IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL; 48 int undo_button_ids = IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL;
49 if (!is_sync_allowed) { 49 if (!is_sync_allowed) {
50 title_ids = IDS_SYNC_DISABLED_CONFIRMATION_CHROME_SYNC_TITLE; 50 title_ids = IDS_SYNC_DISABLED_CONFIRMATION_CHROME_SYNC_TITLE;
51 confirm_button_ids = IDS_SYNC_DISABLED_CONFIRMATION_CONFIRM_BUTTON_LABEL; 51 confirm_button_ids = IDS_SYNC_DISABLED_CONFIRMATION_CONFIRM_BUTTON_LABEL;
52 undo_button_ids = IDS_SYNC_DISABLED_CONFIRMATION_UNDO_BUTTON_LABEL; 52 undo_button_ids = IDS_SYNC_DISABLED_CONFIRMATION_UNDO_BUTTON_LABEL;
53 } 53 }
54 source->AddLocalizedString("syncConfirmationTitle", title_ids); 54 source->AddLocalizedString("syncConfirmationTitle", title_ids);
55 source->AddLocalizedString("syncConfirmationConfirmLabel", 55 source->AddLocalizedString("syncConfirmationConfirmLabel",
56 confirm_button_ids); 56 confirm_button_ids);
57 source->AddLocalizedString("syncConfirmationUndoLabel", undo_button_ids); 57 source->AddLocalizedString("syncConfirmationUndoLabel", undo_button_ids);
58 58
59 base::DictionaryValue strings; 59 base::DictionaryValue strings;
60 webui::SetLoadTimeDataDefaults( 60 webui::SetLoadTimeDataDefaults(
61 g_browser_process->GetApplicationLocale(), &strings); 61 g_browser_process->GetApplicationLocale(), &strings);
62 source->AddLocalizedStrings(strings); 62 source->AddLocalizedStrings(strings);
63 63
64 content::WebUIDataSource::Add(profile, source); 64 content::WebUIDataSource::Add(profile, source);
65 } 65 }
66 66
67 void SyncConfirmationUI::InitializeMessageHandlerWithBrowser(Browser* browser) { 67 void SyncConfirmationUI::InitializeMessageHandlerWithBrowser(Browser* browser) {
68 web_ui()->AddMessageHandler( 68 web_ui()->AddMessageHandler(
69 base::MakeUnique<SyncConfirmationHandler>(browser)); 69 base::MakeUnique<SyncConfirmationHandler>(browser));
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698