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

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: fix formatting 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 {"edit", IDS_SETTINGS_EDIT}, 90 {"edit", IDS_SETTINGS_EDIT},
91 {"learnMore", IDS_LEARN_MORE}, 91 {"learnMore", IDS_LEARN_MORE},
92 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL}, 92 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL},
93 {"moreActions", IDS_SETTINGS_MORE_ACTIONS}, 93 {"moreActions", IDS_SETTINGS_MORE_ACTIONS},
94 {"ok", IDS_OK}, 94 {"ok", IDS_OK},
95 {"restart", IDS_SETTINGS_RESTART}, 95 {"restart", IDS_SETTINGS_RESTART},
96 {"save", IDS_SAVE}, 96 {"save", IDS_SAVE},
97 {"settings", IDS_SETTINGS_SETTINGS}, 97 {"settings", IDS_SETTINGS_SETTINGS},
98 {"toggleOn", IDS_SETTINGS_TOGGLE_ON}, 98 {"toggleOn", IDS_SETTINGS_TOGGLE_ON},
99 {"toggleOff", IDS_SETTINGS_TOGGLE_OFF}, 99 {"toggleOff", IDS_SETTINGS_TOGGLE_OFF},
100 {"notValid", IDS_SETTINGS_NOT_VALID},
100 }; 101 };
101 AddLocalizedStringsBulk(html_source, localized_strings, 102 AddLocalizedStringsBulk(html_source, localized_strings,
102 arraysize(localized_strings)); 103 arraysize(localized_strings));
103 104
104 html_source->AddBoolean( 105 html_source->AddBoolean(
105 "isGuest", 106 "isGuest",
106 #if defined(OS_CHROMEOS) 107 #if defined(OS_CHROMEOS)
107 user_manager::UserManager::Get()->IsLoggedInAsGuest() || 108 user_manager::UserManager::Get()->IsLoggedInAsGuest() ||
108 user_manager::UserManager::Get()->IsLoggedInAsPublicAccount()); 109 user_manager::UserManager::Get()->IsLoggedInAsPublicAccount());
109 #else 110 #else
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 html_source->AddString("searchExplanation", search_explanation_text); 1552 html_source->AddString("searchExplanation", search_explanation_text);
1552 } 1553 }
1553 1554
1554 void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { 1555 void AddSearchEnginesStrings(content::WebUIDataSource* html_source) {
1555 LocalizedString localized_strings[] = { 1556 LocalizedString localized_strings[] = {
1556 {"searchEnginesPageTitle", IDS_SETTINGS_SEARCH_ENGINES}, 1557 {"searchEnginesPageTitle", IDS_SETTINGS_SEARCH_ENGINES},
1557 {"searchEnginesAddSearchEngine", 1558 {"searchEnginesAddSearchEngine",
1558 IDS_SETTINGS_SEARCH_ENGINES_ADD_SEARCH_ENGINE}, 1559 IDS_SETTINGS_SEARCH_ENGINES_ADD_SEARCH_ENGINE},
1559 {"searchEnginesEditSearchEngine", 1560 {"searchEnginesEditSearchEngine",
1560 IDS_SETTINGS_SEARCH_ENGINES_EDIT_SEARCH_ENGINE}, 1561 IDS_SETTINGS_SEARCH_ENGINES_EDIT_SEARCH_ENGINE},
1561 {"searchEnginesNotValid", IDS_SETTINGS_SEARCH_ENGINES_NOT_VALID},
1562 {"searchEngines", IDS_SETTINGS_SEARCH_ENGINES}, 1562 {"searchEngines", IDS_SETTINGS_SEARCH_ENGINES},
1563 {"searchEnginesDefault", IDS_SETTINGS_SEARCH_ENGINES_DEFAULT_ENGINES}, 1563 {"searchEnginesDefault", IDS_SETTINGS_SEARCH_ENGINES_DEFAULT_ENGINES},
1564 {"searchEnginesOther", IDS_SETTINGS_SEARCH_ENGINES_OTHER_ENGINES}, 1564 {"searchEnginesOther", IDS_SETTINGS_SEARCH_ENGINES_OTHER_ENGINES},
1565 {"searchEnginesNoOtherEngines", 1565 {"searchEnginesNoOtherEngines",
1566 IDS_SETTINGS_SEARCH_ENGINES_NO_OTHER_ENGINES}, 1566 IDS_SETTINGS_SEARCH_ENGINES_NO_OTHER_ENGINES},
1567 {"searchEnginesExtension", IDS_SETTINGS_SEARCH_ENGINES_EXTENSION_ENGINES}, 1567 {"searchEnginesExtension", IDS_SETTINGS_SEARCH_ENGINES_EXTENSION_ENGINES},
1568 {"searchEnginesSearchEngine", IDS_SETTINGS_SEARCH_ENGINES_SEARCH_ENGINE}, 1568 {"searchEnginesSearchEngine", IDS_SETTINGS_SEARCH_ENGINES_SEARCH_ENGINE},
1569 {"searchEnginesKeyword", IDS_SETTINGS_SEARCH_ENGINES_KEYWORD}, 1569 {"searchEnginesKeyword", IDS_SETTINGS_SEARCH_ENGINES_KEYWORD},
1570 {"searchEnginesQueryURL", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL}, 1570 {"searchEnginesQueryURL", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL},
1571 {"searchEnginesQueryURLExplanation", 1571 {"searchEnginesQueryURLExplanation",
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 2006
2007 #if defined(OS_CHROMEOS) 2007 #if defined(OS_CHROMEOS)
2008 chromeos::network_element::AddLocalizedStrings(html_source); 2008 chromeos::network_element::AddLocalizedStrings(html_source);
2009 #endif 2009 #endif
2010 policy_indicator::AddLocalizedStrings(html_source); 2010 policy_indicator::AddLocalizedStrings(html_source);
2011 2011
2012 html_source->SetJsonPath(kLocalizedStringsFile); 2012 html_source->SetJsonPath(kLocalizedStringsFile);
2013 } 2013 }
2014 2014
2015 } // namespace settings 2015 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698