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

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

Issue 14924002: WebUI for Profile Settings Reset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/browser/ui/webui/options/options_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, 278 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL },
279 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, 279 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
280 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, 280 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT },
281 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, 281 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL },
282 #if defined(ENABLE_SETTINGS_APP) 282 #if defined(ENABLE_SETTINGS_APP)
283 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL }, 283 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL },
284 #endif 284 #endif
285 { "proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL }, 285 { "proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL },
286 { "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL, 286 { "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL,
287 IDS_PRODUCT_NAME }, 287 IDS_PRODUCT_NAME },
288 { "resetProfileSettings", IDS_RESET_PROFILE_SETTINGS_BUTTON },
289 { "resetProfileSettingsDescription",
290 IDS_RESET_PROFILE_SETTINGS_DESCRIPTION },
291 { "resetProfileSettingsSectionTitle",
292 IDS_RESET_PROFILE_SETTINGS_SECTION_TITLE },
288 { "safeBrowsingEnableProtection", 293 { "safeBrowsingEnableProtection",
289 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, 294 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION },
290 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, 295 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME },
291 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, 296 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME },
292 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME }, 297 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME },
293 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, 298 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME },
294 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, 299 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME },
295 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, 300 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME },
296 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, 301 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT },
297 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, 302 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE },
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 ManagedUserService* service = 508 ManagedUserService* service =
504 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); 509 ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()));
505 values->SetBoolean("profileIsManaged", service->ProfileIsManaged()); 510 values->SetBoolean("profileIsManaged", service->ProfileIsManaged());
506 #endif 511 #endif
507 512
508 #if !defined(OS_CHROMEOS) 513 #if !defined(OS_CHROMEOS)
509 values->SetBoolean( 514 values->SetBoolean(
510 "gpuEnabledAtStart", 515 "gpuEnabledAtStart",
511 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref()); 516 g_browser_process->gpu_mode_manager()->initial_gpu_mode_pref());
512 #endif 517 #endif
518
519 values->SetBoolean("enableResetProfileSettingsSection",
520 CommandLine::ForCurrentProcess()->HasSwitch(
521 switches::kEnableResetProfileSettings));
513 } 522 }
514 523
515 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) { 524 void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) {
516 #if defined(OS_CHROMEOS) 525 #if defined(OS_CHROMEOS)
517 values->SetString("cloudPrintChromeosOptionLabel", 526 values->SetString("cloudPrintChromeosOptionLabel",
518 l10n_util::GetStringFUTF16( 527 l10n_util::GetStringFUTF16(
519 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, 528 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
520 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); 529 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
521 values->SetString("cloudPrintChromeosOptionButton", 530 values->SetString("cloudPrintChromeosOptionButton",
522 l10n_util::GetStringFUTF16( 531 l10n_util::GetStringFUTF16(
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1583 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1575 is_extension_controlled); 1584 is_extension_controlled);
1576 base::FundamentalValue extension_controlled(is_extension_controlled); 1585 base::FundamentalValue extension_controlled(is_extension_controlled);
1577 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1586 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1578 disabled, extension_controlled); 1587 disabled, extension_controlled);
1579 1588
1580 #endif // !defined(OS_CHROMEOS) 1589 #endif // !defined(OS_CHROMEOS)
1581 } 1590 }
1582 1591
1583 } // namespace options 1592 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/browser/ui/webui/options/options_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698