OLD | NEW |
---|---|
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/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, | 259 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, |
260 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, | 260 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, |
261 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, | 261 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, |
262 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, | 262 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, |
263 #if defined(ENABLE_SETTINGS_APP) | 263 #if defined(ENABLE_SETTINGS_APP) |
264 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL }, | 264 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL }, |
265 #endif | 265 #endif |
266 { "proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL }, | 266 { "proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL }, |
267 { "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL, | 267 { "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL, |
268 IDS_PRODUCT_NAME }, | 268 IDS_PRODUCT_NAME }, |
269 { "resetProfileSettingsButton", IDS_RESET_PROFILE_SETTINGS_BUTTON}, | |
270 { "resetProfileSettingsDescription", | |
271 IDS_RESET_PROFILE_SETTINGS_DESCRIPTION}, | |
272 { "resetProfileSettingsSectionTitle", | |
273 IDS_RESET_PROFILE_SETTINGS_SECTION_TITLE}, | |
269 { "safeBrowsingEnableProtection", | 274 { "safeBrowsingEnableProtection", |
270 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, | 275 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, |
271 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, | 276 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, |
272 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, | 277 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, |
273 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME }, | 278 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME }, |
274 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, | 279 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, |
275 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, | 280 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, |
276 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, | 281 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, |
277 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, | 282 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, |
278 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, | 283 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
490 ManagedUserService* service = | 495 ManagedUserService* service = |
491 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); | 496 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); |
492 values->SetBoolean("profileIsManaged", service->ProfileIsManaged()); | 497 values->SetBoolean("profileIsManaged", service->ProfileIsManaged()); |
493 #endif | 498 #endif |
494 | 499 |
495 #if !defined(OS_CHROMEOS) | 500 #if !defined(OS_CHROMEOS) |
496 values->SetBoolean( | 501 values->SetBoolean( |
497 "gpuEnabledAtStart", | 502 "gpuEnabledAtStart", |
498 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref()); | 503 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref()); |
499 #endif | 504 #endif |
505 | |
506 values->SetBoolean("enableProfileSection", | |
vasilii
2013/05/13 09:13:06
Maybe enableResetProfileSection is a better name?
battre
2013/05/13 15:54:06
Done.
| |
507 CommandLine::ForCurrentProcess()->HasSwitch( | |
508 switches::kEnableResetProfileSettings)); | |
500 } | 509 } |
501 | 510 |
502 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) { | 511 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) { |
503 #if defined(OS_CHROMEOS) | 512 #if defined(OS_CHROMEOS) |
504 values->SetString("cloudPrintChromeosOptionLabel", | 513 values->SetString("cloudPrintChromeosOptionLabel", |
505 l10n_util::GetStringFUTF16( | 514 l10n_util::GetStringFUTF16( |
506 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, | 515 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, |
507 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 516 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
508 values->SetString("cloudPrintChromeosOptionButton", | 517 values->SetString("cloudPrintChromeosOptionButton", |
509 l10n_util::GetStringFUTF16( | 518 l10n_util::GetStringFUTF16( |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1525 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || | 1534 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
1526 is_extension_controlled); | 1535 is_extension_controlled); |
1527 base::FundamentalValue extension_controlled(is_extension_controlled); | 1536 base::FundamentalValue extension_controlled(is_extension_controlled); |
1528 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1537 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
1529 disabled, extension_controlled); | 1538 disabled, extension_controlled); |
1530 | 1539 |
1531 #endif // !defined(OS_CHROMEOS) | 1540 #endif // !defined(OS_CHROMEOS) |
1532 } | 1541 } |
1533 | 1542 |
1534 } // namespace options | 1543 } // namespace options |
OLD | NEW |