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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_handler_common.cc

Issue 2121303003: Remove the "Settings" packaged app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options/language_options_handler_common.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #endif // !OS_MACOSX 88 #endif // !OS_MACOSX
89 { "addLanguageTitle", IDS_OPTIONS_LANGUAGES_ADD_TITLE }, 89 { "addLanguageTitle", IDS_OPTIONS_LANGUAGES_ADD_TITLE },
90 { "addLanguageSelectLabel", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL }, 90 { "addLanguageSelectLabel", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL },
91 { "restartButton", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON }, 91 { "restartButton", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON },
92 { "offerToTranslateInThisLanguage", 92 { "offerToTranslateInThisLanguage",
93 IDS_OPTIONS_LANGUAGES_OFFER_TO_TRANSLATE_IN_THIS_LANGUAGE }, 93 IDS_OPTIONS_LANGUAGES_OFFER_TO_TRANSLATE_IN_THIS_LANGUAGE },
94 { "cannotTranslateInThisLanguage", 94 { "cannotTranslateInThisLanguage",
95 IDS_OPTIONS_LANGUAGES_CANNOT_TRANSLATE_IN_THIS_LANGUAGE }, 95 IDS_OPTIONS_LANGUAGES_CANNOT_TRANSLATE_IN_THIS_LANGUAGE },
96 }; 96 };
97 97
98 #if defined(ENABLE_SETTINGS_APP)
99 static OptionsStringResource app_resources[] = {
100 { "cannotBeDisplayedInThisLanguage",
101 IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE,
102 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
103 { "isDisplayedInThisLanguage",
104 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
105 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
106 { "displayInThisLanguage",
107 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
108 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
109 };
110 base::DictionaryValue* app_values = NULL;
111 CHECK(localized_strings->GetDictionary(kSettingsAppKey, &app_values));
112 RegisterStrings(app_values, app_resources, arraysize(app_resources));
113 #endif
114
115 RegisterStrings(localized_strings, resources, arraysize(resources)); 98 RegisterStrings(localized_strings, resources, arraysize(resources));
116 99
117 // The following are resources, rather than local strings. 100 // The following are resources, rather than local strings.
118 std::string application_locale = g_browser_process->GetApplicationLocale(); 101 std::string application_locale = g_browser_process->GetApplicationLocale();
119 localized_strings->SetString("currentUiLanguageCode", application_locale); 102 localized_strings->SetString("currentUiLanguageCode", application_locale);
120 std::string prospective_locale = 103 std::string prospective_locale =
121 g_browser_process->local_state()->GetString(prefs::kApplicationLocale); 104 g_browser_process->local_state()->GetString(prefs::kApplicationLocale);
122 localized_strings->SetString("prospectiveUiLanguageCode", 105 localized_strings->SetString("prospectiveUiLanguageCode",
123 !prospective_locale.empty() ? prospective_locale : application_locale); 106 !prospective_locale.empty() ? prospective_locale : application_locale);
124 localized_strings->Set("spellCheckLanguageCodeSet", 107 localized_strings->Set("spellCheckLanguageCodeSet",
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 return; 291 return;
309 } 292 }
310 } 293 }
311 } 294 }
312 295
313 SpellcheckService* LanguageOptionsHandlerCommon::GetSpellcheckService() { 296 SpellcheckService* LanguageOptionsHandlerCommon::GetSpellcheckService() {
314 return SpellcheckServiceFactory::GetForContext(Profile::FromWebUI(web_ui())); 297 return SpellcheckServiceFactory::GetForContext(Profile::FromWebUI(web_ui()));
315 } 298 }
316 299
317 } // namespace options 300 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/browser/ui/webui/options/manage_profile_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698