| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 ManagedUserService* service = | 488 ManagedUserService* service = |
| 484 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); | 489 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); |
| 485 values->SetBoolean("profileIsManaged", service->ProfileIsManaged()); | 490 values->SetBoolean("profileIsManaged", service->ProfileIsManaged()); |
| 486 #endif | 491 #endif |
| 487 | 492 |
| 488 #if !defined(OS_CHROMEOS) | 493 #if !defined(OS_CHROMEOS) |
| 489 values->SetBoolean( | 494 values->SetBoolean( |
| 490 "gpuEnabledAtStart", | 495 "gpuEnabledAtStart", |
| 491 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref()); | 496 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref()); |
| 492 #endif | 497 #endif |
| 498 |
| 499 values->SetBoolean("enableResetProfileSettingsSection", |
| 500 CommandLine::ForCurrentProcess()->HasSwitch( |
| 501 switches::kEnableResetProfileSettings)); |
| 493 } | 502 } |
| 494 | 503 |
| 495 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) { | 504 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) { |
| 496 #if defined(OS_CHROMEOS) | 505 #if defined(OS_CHROMEOS) |
| 497 values->SetString("cloudPrintChromeosOptionLabel", | 506 values->SetString("cloudPrintChromeosOptionLabel", |
| 498 l10n_util::GetStringFUTF16( | 507 l10n_util::GetStringFUTF16( |
| 499 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, | 508 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, |
| 500 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 509 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
| 501 values->SetString("cloudPrintChromeosOptionButton", | 510 values->SetString("cloudPrintChromeosOptionButton", |
| 502 l10n_util::GetStringFUTF16( | 511 l10n_util::GetStringFUTF16( |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || | 1529 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
| 1521 is_extension_controlled); | 1530 is_extension_controlled); |
| 1522 base::FundamentalValue extension_controlled(is_extension_controlled); | 1531 base::FundamentalValue extension_controlled(is_extension_controlled); |
| 1523 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1532 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
| 1524 disabled, extension_controlled); | 1533 disabled, extension_controlled); |
| 1525 | 1534 |
| 1526 #endif // !defined(OS_CHROMEOS) | 1535 #endif // !defined(OS_CHROMEOS) |
| 1527 } | 1536 } |
| 1528 | 1537 |
| 1529 } // namespace options | 1538 } // namespace options |
| OLD | NEW |