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

Side by Side Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 9317114: Settings: Clean up browser_options page according to style guide. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
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/options2/browser_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 default_browser_worker_->ObserverDestroyed(); 104 default_browser_worker_->ObserverDestroyed();
105 if (template_url_service_) 105 if (template_url_service_)
106 template_url_service_->RemoveObserver(this); 106 template_url_service_->RemoveObserver(this);
107 } 107 }
108 108
109 void BrowserOptionsHandler::GetLocalizedValues( 109 void BrowserOptionsHandler::GetLocalizedValues(
110 DictionaryValue* localized_strings) { 110 DictionaryValue* localized_strings) {
111 DCHECK(localized_strings); 111 DCHECK(localized_strings);
112 112
113 static OptionsStringResource resources[] = { 113 static OptionsStringResource resources[] = {
114 { "advancedOptionsButtonTitle", IDS_OPTIONS_ADVANCED_BUTTON_TITLE }, 114 { "advancedSettings", IDS_OPTIONS_ADVANCED_BUTTON_TITLE },
115 { "autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN }, 115 { "autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN },
116 { "browsingData", IDS_OPTIONS_BROWSING_DATA_GROUP_NAME }, // needed? 116 { "browsingData", IDS_OPTIONS_BROWSING_DATA_GROUP_NAME }, // needed?
117 { "changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE }, 117 { "changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE },
118 { "customizeSync", IDS_OPTIONS2_CUSTOMIZE_SYNC_BUTTON_LABEL }, 118 { "customizeSync", IDS_OPTIONS2_CUSTOMIZE_SYNC_BUTTON_LABEL },
119 { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES }, 119 { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES },
120 { "homePageTitle", IDS_OPTIONS2_HOMEPAGE_TITLE }, 120 { "homePageTitle", IDS_OPTIONS2_HOMEPAGE_TITLE },
121 { "homepageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB }, 121 { "homepageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB },
122 { "homepageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL }, 122 { "homepageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL },
123 { "instantConfirmMessage", IDS_INSTANT_OPT_IN_MESSAGE }, 123 { "instantConfirmMessage", IDS_INSTANT_OPT_IN_MESSAGE },
124 { "instantConfirmTitle", IDS_INSTANT_OPT_IN_TITLE }, 124 { "instantConfirmTitle", IDS_INSTANT_OPT_IN_TITLE },
125 { "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON }, 125 { "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON },
126 { "manageDataDescription", IDS_OPTIONS_MANAGE_DATA_DESCRIPTION }, 126 { "manageDataDescription", IDS_OPTIONS_MANAGE_DATA_DESCRIPTION },
127 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, 127 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL },
128 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, 128 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL },
129 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, 129 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
130 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, 130 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT },
131 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, 131 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL },
132 { "sectionTitleAdvanced", IDS_OPTIONS_ADVANCED_TAB_LABEL }, 132 { "sectionTitleAdvanced", IDS_OPTIONS_ADVANCED_TAB_LABEL },
133 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, 133 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME },
134 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, 134 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME },
135 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME }, 135 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME },
136 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, 136 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME },
137 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, 137 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME },
138 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, 138 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME },
139 { "settingsTitle", IDS_SETTINGS_TITLE },
139 { "startupSetPages", IDS_OPTIONS2_STARTUP_SET_PAGES }, 140 { "startupSetPages", IDS_OPTIONS2_STARTUP_SET_PAGES },
140 { "startupShowDefaultAndNewTab", 141 { "startupShowDefaultAndNewTab",
141 IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB}, 142 IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB},
142 { "startupShowLastSession", IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION }, 143 { "startupShowLastSession", IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION },
143 { "startupShowPages", IDS_OPTIONS2_STARTUP_SHOW_PAGES }, 144 { "startupShowPages", IDS_OPTIONS2_STARTUP_SHOW_PAGES },
144 { "themesGallery", IDS_THEMES_GALLERY_BUTTON }, 145 { "themesGallery", IDS_THEMES_GALLERY_BUTTON },
145 { "themesGalleryURL", IDS_THEMES_GALLERY_URL }, 146 { "themesGalleryURL", IDS_THEMES_GALLERY_URL },
146 { "toolbarGroupName", IDS_OPTIONS2_TOOLBAR_GROUP_NAME }, 147 { "toolbarGroupName", IDS_OPTIONS2_TOOLBAR_GROUP_NAME },
147 { "toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR }, 148 { "toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR },
148 { "toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON }, 149 { "toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON },
(...skipping 22 matching lines...) Expand all
171 { "pointerSensitivityMore", 172 { "pointerSensitivityMore",
172 IDS_OPTIONS_SETTINGS_SENSITIVITY_MORE_DESCRIPTION }, 173 IDS_OPTIONS_SETTINGS_SENSITIVITY_MORE_DESCRIPTION },
173 { "pointerSettingsButtonTitle", 174 { "pointerSettingsButtonTitle",
174 IDS_OPTIONS_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE }, 175 IDS_OPTIONS_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE },
175 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, 176 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME },
176 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, 177 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL },
177 #endif 178 #endif
178 }; 179 };
179 180
180 RegisterStrings(localized_strings, resources, arraysize(resources)); 181 RegisterStrings(localized_strings, resources, arraysize(resources));
181 RegisterTitle(localized_strings, "browserPage", IDS_SETTINGS_TITLE);
182 182
183 localized_strings->SetString( 183 localized_strings->SetString(
184 "syncOverview", 184 "syncOverview",
185 l10n_util::GetStringFUTF16(IDS_SYNC_OVERVIEW, 185 l10n_util::GetStringFUTF16(IDS_SYNC_OVERVIEW,
186 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 186 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
187 187
188 localized_strings->SetString("syncLearnMoreURL", chrome::kSyncLearnMoreURL); 188 localized_strings->SetString("syncLearnMoreURL", chrome::kSyncLearnMoreURL);
189 localized_strings->SetString( 189 localized_strings->SetString(
190 "profilesSingleUser", 190 "profilesSingleUser",
191 l10n_util::GetStringFUTF16(IDS_PROFILES_SINGLE_USER_MESSAGE, 191 l10n_util::GetStringFUTF16(IDS_PROFILES_SINGLE_USER_MESSAGE,
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 798 }
799 799
800 void BrowserOptionsHandler::IncreaseScreenBrightnessCallback( 800 void BrowserOptionsHandler::IncreaseScreenBrightnessCallback(
801 const ListValue* args) { 801 const ListValue* args) {
802 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 802 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
803 IncreaseScreenBrightness(); 803 IncreaseScreenBrightness();
804 } 804 }
805 #endif 805 #endif
806 806
807 } // namespace options2 807 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698