| OLD | NEW |
| 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 Loading... |
| 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 {"done", IDS_DONE}, | 80 {"done", IDS_DONE}, |
| 78 {"learnMore", IDS_LEARN_MORE}, | 81 {"learnMore", IDS_LEARN_MORE}, |
| 82 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL}, |
| 79 {"ok", IDS_OK}, | 83 {"ok", IDS_OK}, |
| 84 {"restart", IDS_SETTINGS_RESTART}, |
| 80 {"save", IDS_SAVE}, | 85 {"save", IDS_SAVE}, |
| 81 {"advancedPageTitle", IDS_SETTINGS_ADVANCED}, | |
| 82 {"basicPageTitle", IDS_SETTINGS_BASIC}, | |
| 83 {"settings", IDS_SETTINGS_SETTINGS}, | 86 {"settings", IDS_SETTINGS_SETTINGS}, |
| 84 {"restart", IDS_SETTINGS_RESTART}, | |
| 85 {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL}, | |
| 86 }; | 87 }; |
| 87 AddLocalizedStringsBulk(html_source, localized_strings, | 88 AddLocalizedStringsBulk(html_source, localized_strings, |
| 88 arraysize(localized_strings)); | 89 arraysize(localized_strings)); |
| 89 | 90 |
| 90 html_source->AddBoolean( | 91 html_source->AddBoolean( |
| 91 "isGuest", | 92 "isGuest", |
| 92 #if defined(OS_CHROMEOS) | 93 #if defined(OS_CHROMEOS) |
| 93 user_manager::UserManager::Get()->IsLoggedInAsGuest()); | 94 user_manager::UserManager::Get()->IsLoggedInAsGuest()); |
| 94 #else | 95 #else |
| 95 profile->IsOffTheRecord()); | 96 profile->IsOffTheRecord()); |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 #if defined(USE_NSS_CERTS) | 1818 #if defined(USE_NSS_CERTS) |
| 1818 AddCertificateManagerStrings(html_source); | 1819 AddCertificateManagerStrings(html_source); |
| 1819 #endif | 1820 #endif |
| 1820 | 1821 |
| 1821 policy_indicator::AddLocalizedStrings(html_source); | 1822 policy_indicator::AddLocalizedStrings(html_source); |
| 1822 | 1823 |
| 1823 html_source->SetJsonPath(kLocalizedStringsFile); | 1824 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1824 } | 1825 } |
| 1825 | 1826 |
| 1826 } // namespace settings | 1827 } // namespace settings |
| OLD | NEW |