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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 1168793002: Add an initial implementation of the Privacy Page. No subpages yet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kyle's comments Created 5 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 unified diff | Download patch
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/settings/md_settings_localized_strings_provide r.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
6 6
7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/url_constants.h"
7 #include "chrome/grit/chromium_strings.h" 9 #include "chrome/grit/chromium_strings.h"
8 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
11 #include "chrome/grit/google_chrome_strings.h"
9 #include "chrome/grit/locale_settings.h" 12 #include "chrome/grit/locale_settings.h"
10 #include "content/public/browser/web_ui_data_source.h" 13 #include "content/public/browser/web_ui_data_source.h"
14 #include "ui/base/l10n/l10n_util.h"
11 15
12 namespace { 16 namespace {
13 17
14 // Note that md_settings.html contains a <script> tag which imports a script of 18 // Note that md_settings.html contains a <script> tag which imports a script of
15 // the following name. These names must be kept in sync. 19 // the following name. These names must be kept in sync.
16 const char kLocalizedStringsFile[] = "strings.js"; 20 const char kLocalizedStringsFile[] = "strings.js";
17 21
18 void AddA11yStrings(content::WebUIDataSource* html_source) { 22 void AddA11yStrings(content::WebUIDataSource* html_source) {
19 html_source->AddLocalizedString( 23 html_source->AddLocalizedString(
20 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY_PAGE_TITLE); 24 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY_PAGE_TITLE);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 110
107 #if defined(OS_CHROMEOS) 111 #if defined(OS_CHROMEOS)
108 void AddInternetStrings(content::WebUIDataSource* html_source) { 112 void AddInternetStrings(content::WebUIDataSource* html_source) {
109 html_source->AddLocalizedString( 113 html_source->AddLocalizedString(
110 "internetPageTitle", IDS_SETTINGS_INTERNET_PAGE_TITLE); 114 "internetPageTitle", IDS_SETTINGS_INTERNET_PAGE_TITLE);
111 html_source->AddLocalizedString( 115 html_source->AddLocalizedString(
112 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL_PAGE_TITLE); 116 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL_PAGE_TITLE);
113 } 117 }
114 #endif 118 #endif
115 119
120 void AddPrivacyStrings(content::WebUIDataSource* html_source) {
121 html_source->AddLocalizedString("privacyPageTitle",
122 IDS_SETTINGS_PRIVACY_PAGE_TITLE);
123 html_source->AddString("privacyImproveBrowsingExperience",
124 l10n_util::GetStringFUTF16(
125 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE,
126 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL)));
127 html_source->AddLocalizedString("linkDoctorPref",
128 IDS_SETTINGS_LINKDOCTOR_PREF);
129 html_source->AddLocalizedString("searchSuggestPref",
130 IDS_SETTINGS_SUGGEST_PREF);
131 html_source->AddLocalizedString(
132 "networkPredictionEnabled",
133 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION);
134 html_source->AddLocalizedString("safeBrowsingEnableProtection",
135 IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION);
136 html_source->AddLocalizedString(
137 "safeBrowsingEnableExtendedReporting",
138 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING);
139 html_source->AddLocalizedString("spellingPref",
140 IDS_SETTINGS_SPELLING_PREF);
141 html_source->AddLocalizedString("enableLogging",
142 IDS_SETTINGS_ENABLE_LOGGING);
143 html_source->AddLocalizedString("doNotTrack",
144 IDS_SETTINGS_ENABLE_DO_NOT_TRACK);
145 html_source->AddLocalizedString(
146 "enableContentProtectionAttestation",
147 IDS_SETTINGS_ENABLE_CONTENT_PROTECTION_ATTESTATION);
148 html_source->AddLocalizedString("wakeOnWifi",
149 IDS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION);
150 html_source->AddLocalizedString("privacySiteSettingsLabel",
151 IDS_SETTINGS_PRIVACY_SITE_SETTINGS_BUTTON);
152 html_source->AddLocalizedString("privacyClearBrowsingDataLabel",
153 IDS_SETTINGS_PRIVACY_CLEAR_DATA_BUTTON);
154 }
155
116 void AddSearchStrings(content::WebUIDataSource* html_source) { 156 void AddSearchStrings(content::WebUIDataSource* html_source) {
117 html_source->AddLocalizedString("searchPageTitle", 157 html_source->AddLocalizedString("searchPageTitle",
118 IDS_SETTINGS_SEARCH_PAGE_TITLE); 158 IDS_SETTINGS_SEARCH_PAGE_TITLE);
119 html_source->AddLocalizedString("searchExplanation", 159 html_source->AddLocalizedString("searchExplanation",
120 IDS_SETTINGS_SEARCH_EXPLANATION); 160 IDS_SETTINGS_SEARCH_EXPLANATION);
121 html_source->AddLocalizedString("searchManageButtonLabel", 161 html_source->AddLocalizedString("searchManageButtonLabel",
122 IDS_SETTINGS_SEARCH_MANAGE_BUTTON_LABEL); 162 IDS_SETTINGS_SEARCH_MANAGE_BUTTON_LABEL);
123 html_source->AddLocalizedString("searchOkGoogleLabel", 163 html_source->AddLocalizedString("searchOkGoogleLabel",
124 IDS_SETTINGS_SEARCH_OK_GOOGLE_LABEL); 164 IDS_SETTINGS_SEARCH_OK_GOOGLE_LABEL);
125 html_source->AddLocalizedString( 165 html_source->AddLocalizedString(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 261
222 void AddLocalizedStrings(content::WebUIDataSource* html_source) { 262 void AddLocalizedStrings(content::WebUIDataSource* html_source) {
223 AddA11yStrings(html_source); 263 AddA11yStrings(html_source);
224 AddAppearanceStrings(html_source); 264 AddAppearanceStrings(html_source);
225 AddCommonStrings(html_source); 265 AddCommonStrings(html_source);
226 AddDownloadsStrings(html_source); 266 AddDownloadsStrings(html_source);
227 AddDateTimeStrings(html_source); 267 AddDateTimeStrings(html_source);
228 #if defined(OS_CHROMEOS) 268 #if defined(OS_CHROMEOS)
229 AddInternetStrings(html_source); 269 AddInternetStrings(html_source);
230 #endif 270 #endif
271 AddPrivacyStrings(html_source);
231 AddSearchStrings(html_source); 272 AddSearchStrings(html_source);
232 AddSearchEnginesStrings(html_source); 273 AddSearchEnginesStrings(html_source);
233 AddSyncStrings(html_source); 274 AddSyncStrings(html_source);
234 AddUsersStrings(html_source); 275 AddUsersStrings(html_source);
235 html_source->SetJsonPath(kLocalizedStringsFile); 276 html_source->SetJsonPath(kLocalizedStringsFile);
236 } 277 }
237 278
238 } // namespace settings 279 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698