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

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

Issue 2507003005: Implement extension controlled indicators, starting with New Tab page (Closed)
Patch Set: mo hackin' Created 4 years, 1 month 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 size_t num_strings) { 62 size_t num_strings) {
63 for (size_t i = 0; i < num_strings; i++) { 63 for (size_t i = 0; i < num_strings; i++) {
64 html_source->AddLocalizedString(localized_strings[i].name, 64 html_source->AddLocalizedString(localized_strings[i].name,
65 localized_strings[i].id); 65 localized_strings[i].id);
66 } 66 }
67 } 67 }
68 68
69 void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) { 69 void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) {
70 LocalizedString localized_strings[] = { 70 LocalizedString localized_strings[] = {
71 {"add", IDS_ADD}, 71 {"add", IDS_ADD},
72 {"advancedPageTitle", IDS_SETTINGS_ADVANCED},
72 {"back", IDS_ACCNAME_BACK}, 73 {"back", IDS_ACCNAME_BACK},
74 {"basicPageTitle", IDS_SETTINGS_BASIC},
73 {"cancel", IDS_CANCEL}, 75 {"cancel", IDS_CANCEL},
74 {"close", IDS_CLOSE}, 76 {"close", IDS_CLOSE},
75 {"confirm", IDS_CONFIRM}, 77 {"confirm", IDS_CONFIRM},
78 {"controlledByExtension", IDS_SETTINGS_CONTROLLED_BY_EXTENSION},
76 {"disable", IDS_DISABLE}, 79 {"disable", IDS_DISABLE},
77 {"learnMore", IDS_LEARN_MORE}, 80 {"learnMore", IDS_LEARN_MORE},
81 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL},
78 {"ok", IDS_OK}, 82 {"ok", IDS_OK},
83 {"restart", IDS_SETTINGS_RESTART},
79 {"save", IDS_SAVE}, 84 {"save", IDS_SAVE},
80 {"advancedPageTitle", IDS_SETTINGS_ADVANCED},
81 {"basicPageTitle", IDS_SETTINGS_BASIC},
82 {"settings", IDS_SETTINGS_SETTINGS}, 85 {"settings", IDS_SETTINGS_SETTINGS},
83 {"restart", IDS_SETTINGS_RESTART},
84 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL},
85 }; 86 };
86 AddLocalizedStringsBulk(html_source, localized_strings, 87 AddLocalizedStringsBulk(html_source, localized_strings,
87 arraysize(localized_strings)); 88 arraysize(localized_strings));
88 89
89 html_source->AddBoolean( 90 html_source->AddBoolean(
90 "isGuest", 91 "isGuest",
91 #if defined(OS_CHROMEOS) 92 #if defined(OS_CHROMEOS)
92 user_manager::UserManager::Get()->IsLoggedInAsGuest()); 93 user_manager::UserManager::Get()->IsLoggedInAsGuest());
93 #else 94 #else
94 profile->IsOffTheRecord()); 95 profile->IsOffTheRecord());
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 #if defined(USE_NSS_CERTS) 1809 #if defined(USE_NSS_CERTS)
1809 AddCertificateManagerStrings(html_source); 1810 AddCertificateManagerStrings(html_source);
1810 #endif 1811 #endif
1811 1812
1812 policy_indicator::AddLocalizedStrings(html_source); 1813 policy_indicator::AddLocalizedStrings(html_source);
1813 1814
1814 html_source->SetJsonPath(kLocalizedStringsFile); 1815 html_source->SetJsonPath(kLocalizedStringsFile);
1815 } 1816 }
1816 1817
1817 } // namespace settings 1818 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698