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

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: remove copy pasta 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"
9 #include "chrome/grit/locale_settings.h" 11 #include "chrome/grit/locale_settings.h"
10 #include "content/public/browser/web_ui_data_source.h" 12 #include "content/public/browser/web_ui_data_source.h"
13 #include "ui/base/l10n/l10n_util.h"
11 14
12 namespace { 15 namespace {
13 16
14 // Note that md_settings.html contains a <script> tag which imports a script of 17 // 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. 18 // the following name. These names must be kept in sync.
16 const char kLocalizedStringsFile[] = "strings.js"; 19 const char kLocalizedStringsFile[] = "strings.js";
17 20
18 void AddA11yStrings(content::WebUIDataSource* html_source) { 21 void AddA11yStrings(content::WebUIDataSource* html_source) {
19 html_source->AddLocalizedString( 22 html_source->AddLocalizedString(
20 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY_PAGE_TITLE); 23 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY_PAGE_TITLE);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 109
107 #if defined(OS_CHROMEOS) 110 #if defined(OS_CHROMEOS)
108 void AddInternetStrings(content::WebUIDataSource* html_source) { 111 void AddInternetStrings(content::WebUIDataSource* html_source) {
109 html_source->AddLocalizedString( 112 html_source->AddLocalizedString(
110 "internetPageTitle", IDS_SETTINGS_INTERNET_PAGE_TITLE); 113 "internetPageTitle", IDS_SETTINGS_INTERNET_PAGE_TITLE);
111 html_source->AddLocalizedString( 114 html_source->AddLocalizedString(
112 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL_PAGE_TITLE); 115 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL_PAGE_TITLE);
113 } 116 }
114 #endif 117 #endif
115 118
119 void AddPrivacyStrings(content::WebUIDataSource* html_source) {
120 html_source->AddLocalizedString("privacyPageTitle",
121 IDS_SETTINGS_PRIVACY_PAGE_TITLE);
122 html_source->AddString("privacyImproveBrowsingExperience",
123 l10n_util::GetStringFUTF16(
124 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE,
125 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL)));
126 html_source->AddLocalizedString("linkDoctorPref",
127 IDS_SETTINGS_LINKDOCTOR_PREF);
128 html_source->AddLocalizedString("searchSuggestPref",
129 IDS_SETTINGS_SUGGEST_PREF);
130 html_source->AddLocalizedString(
131 "networkPredictionEnabled",
132 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION);
133 html_source->AddLocalizedString("safeBrowsingEnableProtection",
134 IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION);
135 html_source->AddLocalizedString(
136 "safeBrowsingEnableExtendedReporting",
137 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING);
138 html_source->AddLocalizedString("spellingPref",
139 IDS_SETTINGS_SPELLING_PREF);
140 html_source->AddLocalizedString("enableLogging",
141 IDS_SETTINGS_ENABLE_LOGGING);
142 html_source->AddLocalizedString("doNotTrack",
143 IDS_SETTINGS_ENABLE_DO_NOT_TRACK);
144 html_source->AddLocalizedString(
145 "enableContentProtectionAttestation",
146 IDS_SETTINGS_ENABLE_CONTENT_PROTECTION_ATTESTATION);
147 html_source->AddLocalizedString("wakeOnWifi",
148 IDS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION);
149 html_source->AddLocalizedString("privacySiteSettingsLabel",
150 IDS_SETTINGS_PRIVACY_SITE_SETTINGS_BUTTON);
151 html_source->AddLocalizedString("privacyClearBrowsingDataLabel",
152 IDS_SETTINGS_PRIVACY_CLEAR_DATA_BUTTON);
153 }
154
116 void AddSearchStrings(content::WebUIDataSource* html_source) { 155 void AddSearchStrings(content::WebUIDataSource* html_source) {
117 html_source->AddLocalizedString("searchPageTitle", 156 html_source->AddLocalizedString("searchPageTitle",
118 IDS_SETTINGS_SEARCH_PAGE_TITLE); 157 IDS_SETTINGS_SEARCH_PAGE_TITLE);
119 html_source->AddLocalizedString("searchExplanation", 158 html_source->AddLocalizedString("searchExplanation",
120 IDS_SETTINGS_SEARCH_EXPLANATION); 159 IDS_SETTINGS_SEARCH_EXPLANATION);
121 html_source->AddLocalizedString("searchManageButtonLabel", 160 html_source->AddLocalizedString("searchManageButtonLabel",
122 IDS_SETTINGS_SEARCH_MANAGE_BUTTON_LABEL); 161 IDS_SETTINGS_SEARCH_MANAGE_BUTTON_LABEL);
123 html_source->AddLocalizedString("searchOkGoogleLabel", 162 html_source->AddLocalizedString("searchOkGoogleLabel",
124 IDS_SETTINGS_SEARCH_OK_GOOGLE_LABEL); 163 IDS_SETTINGS_SEARCH_OK_GOOGLE_LABEL);
125 html_source->AddLocalizedString( 164 html_source->AddLocalizedString(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 260
222 void AddLocalizedStrings(content::WebUIDataSource* html_source) { 261 void AddLocalizedStrings(content::WebUIDataSource* html_source) {
223 AddA11yStrings(html_source); 262 AddA11yStrings(html_source);
224 AddAppearanceStrings(html_source); 263 AddAppearanceStrings(html_source);
225 AddCommonStrings(html_source); 264 AddCommonStrings(html_source);
226 AddDownloadsStrings(html_source); 265 AddDownloadsStrings(html_source);
227 AddDateTimeStrings(html_source); 266 AddDateTimeStrings(html_source);
228 #if defined(OS_CHROMEOS) 267 #if defined(OS_CHROMEOS)
229 AddInternetStrings(html_source); 268 AddInternetStrings(html_source);
230 #endif 269 #endif
270 AddPrivacyStrings(html_source);
231 AddSearchStrings(html_source); 271 AddSearchStrings(html_source);
232 AddSearchEnginesStrings(html_source); 272 AddSearchEnginesStrings(html_source);
233 AddSyncStrings(html_source); 273 AddSyncStrings(html_source);
234 AddUsersStrings(html_source); 274 AddUsersStrings(html_source);
235 html_source->SetJsonPath(kLocalizedStringsFile); 275 html_source->SetJsonPath(kLocalizedStringsFile);
236 } 276 }
237 277
238 } // namespace settings 278 } // namespace settings
OLDNEW
« chrome/app/settings_strings.grdp ('K') | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698