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

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

Issue 2766093002: MD Settings: validate home button url input (Closed)
Patch Set: add tests for home button urls Created 3 years, 9 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 #endif 301 #endif
302 302
303 void AddAppearanceStrings(content::WebUIDataSource* html_source, 303 void AddAppearanceStrings(content::WebUIDataSource* html_source,
304 Profile* profile) { 304 Profile* profile) {
305 LocalizedString localized_strings[] = { 305 LocalizedString localized_strings[] = {
306 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE}, 306 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE},
307 {"customWebAddress", IDS_SETTINGS_CUSTOM_WEB_ADDRESS}, 307 {"customWebAddress", IDS_SETTINGS_CUSTOM_WEB_ADDRESS},
308 {"enterCustomWebAddress", IDS_SETTINGS_ENTER_CUSTOM_WEB_ADDRESS}, 308 {"enterCustomWebAddress", IDS_SETTINGS_ENTER_CUSTOM_WEB_ADDRESS},
309 {"homeButtonDisabled", IDS_SETTINGS_HOME_BUTTON_DISABLED}, 309 {"homeButtonDisabled", IDS_SETTINGS_HOME_BUTTON_DISABLED},
310 {"homeUrlNotValid", IDS_SETTINGS_HOME_URL_NOT_VALID},
310 {"themes", IDS_SETTINGS_THEMES}, 311 {"themes", IDS_SETTINGS_THEMES},
311 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 312 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
312 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, 313 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME},
313 {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME}, 314 {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME},
314 {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, 315 {"classicTheme", IDS_SETTINGS_CLASSIC_THEME},
315 {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME}, 316 {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME},
316 #else 317 #else
317 {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, 318 {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME},
318 #endif 319 #endif
319 {"showHomeButton", IDS_SETTINGS_SHOW_HOME_BUTTON}, 320 {"showHomeButton", IDS_SETTINGS_SHOW_HOME_BUTTON},
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 2007
2007 #if defined(OS_CHROMEOS) 2008 #if defined(OS_CHROMEOS)
2008 chromeos::network_element::AddLocalizedStrings(html_source); 2009 chromeos::network_element::AddLocalizedStrings(html_source);
2009 #endif 2010 #endif
2010 policy_indicator::AddLocalizedStrings(html_source); 2011 policy_indicator::AddLocalizedStrings(html_source);
2011 2012
2012 html_source->SetJsonPath(kLocalizedStringsFile); 2013 html_source->SetJsonPath(kLocalizedStringsFile);
2013 } 2014 }
2014 2015
2015 } // namespace settings 2016 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698