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

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

Issue 2540433002: Reland "Propagate information about how ARC apps are launched" (Closed)
Patch Set: Dedupe some code + propagate flags from JS Created 4 years 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/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "third_party/skia/include/core/SkBitmap.h" 111 #include "third_party/skia/include/core/SkBitmap.h"
112 #include "ui/base/l10n/l10n_util.h" 112 #include "ui/base/l10n/l10n_util.h"
113 #include "ui/base/webui/web_ui_util.h" 113 #include "ui/base/webui/web_ui_util.h"
114 114
115 #if !defined(OS_CHROMEOS) 115 #if !defined(OS_CHROMEOS)
116 #include "chrome/browser/ui/startup/default_browser_prompt.h" 116 #include "chrome/browser/ui/startup/default_browser_prompt.h"
117 #include "chrome/browser/ui/webui/settings_utils.h" 117 #include "chrome/browser/ui/webui/settings_utils.h"
118 #endif 118 #endif
119 119
120 #if defined(OS_CHROMEOS) 120 #if defined(OS_CHROMEOS)
121 #include "ash/common/accessibility_types.h" // nogncheck 121 #include "ash/common/accessibility_types.h" // nogncheck
122 #include "ash/common/system/chromeos/devicetype_utils.h" // nogncheck 122 #include "ash/common/system/chromeos/devicetype_utils.h" // nogncheck
123 #include "ash/shell.h" // nogncheck 123 #include "ash/shell.h" // nogncheck
124 #include "chrome/browser/browser_process_platform_part.h" 124 #include "chrome/browser/browser_process_platform_part.h"
125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
126 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 126 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
127 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" 127 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
128 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 128 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
129 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" 129 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h"
130 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 130 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
131 #include "chrome/browser/chromeos/profiles/profile_helper.h" 131 #include "chrome/browser/chromeos/profiles/profile_helper.h"
132 #include "chrome/browser/chromeos/reset/metrics.h" 132 #include "chrome/browser/chromeos/reset/metrics.h"
133 #include "chrome/browser/chromeos/settings/cros_settings.h" 133 #include "chrome/browser/chromeos/settings/cros_settings.h"
134 #include "chrome/browser/chromeos/system/timezone_util.h" 134 #include "chrome/browser/chromeos/system/timezone_util.h"
135 #include "chrome/browser/policy/profile_policy_connector.h" 135 #include "chrome/browser/policy/profile_policy_connector.h"
136 #include "chrome/browser/policy/profile_policy_connector_factory.h" 136 #include "chrome/browser/policy/profile_policy_connector_factory.h"
137 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 137 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
138 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" 138 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
139 #include "chrome/browser/ui/browser_window.h" 139 #include "chrome/browser/ui/browser_window.h"
140 #include "chromeos/chromeos_switches.h" 140 #include "chromeos/chromeos_switches.h"
141 #include "chromeos/dbus/dbus_thread_manager.h" 141 #include "chromeos/dbus/dbus_thread_manager.h"
142 #include "chromeos/dbus/power_manager_client.h" 142 #include "chromeos/dbus/power_manager_client.h"
143 #include "components/arc/arc_bridge_service.h" 143 #include "components/arc/arc_bridge_service.h"
144 #include "components/user_manager/user.h" 144 #include "components/user_manager/user.h"
145 #include "components/user_manager/user_manager.h" 145 #include "components/user_manager/user_manager.h"
146 #include "ui/events/event_constants.h"
146 #include "ui/gfx/image/image_skia.h" 147 #include "ui/gfx/image/image_skia.h"
147 #endif // defined(OS_CHROMEOS) 148 #endif // defined(OS_CHROMEOS)
148 149
149 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 150 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
150 #include "chrome/browser/printing/cloud_print/privet_notifications.h" 151 #include "chrome/browser/printing/cloud_print/privet_notifications.h"
151 #endif 152 #endif
152 153
153 #if defined(USE_ASH) 154 #if defined(USE_ASH)
154 #include "ash/common/wm_shell.h" // nogncheck 155 #include "ash/common/wm_shell.h" // nogncheck
155 #endif 156 #endif
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 const int device_type_resource_id = ash::GetChromeOSDeviceTypeResourceId(); 246 const int device_type_resource_id = ash::GetChromeOSDeviceTypeResourceId();
246 const int enable_logging_resource_id = 247 const int enable_logging_resource_id =
247 IDS_OPTIONS_ENABLE_LOGGING_DIAGNOSTIC_AND_USAGE_DATA; 248 IDS_OPTIONS_ENABLE_LOGGING_DIAGNOSTIC_AND_USAGE_DATA;
248 #else 249 #else
249 const int device_type_resource_id = IDS_EASY_UNLOCK_GENERIC_DEVICE_TYPE; 250 const int device_type_resource_id = IDS_EASY_UNLOCK_GENERIC_DEVICE_TYPE;
250 const int enable_logging_resource_id = IDS_OPTIONS_ENABLE_LOGGING; 251 const int enable_logging_resource_id = IDS_OPTIONS_ENABLE_LOGGING;
251 #endif // defined(OS_CHROMEOS) 252 #endif // defined(OS_CHROMEOS)
252 253
253 static OptionsStringResource resources[] = { 254 static OptionsStringResource resources[] = {
254 // Please keep these in alphabetical order. 255 // Please keep these in alphabetical order.
255 { "accessibilityFeaturesLink", IDS_OPTIONS_ACCESSIBILITY_FEATURES_LINK }, 256 {"accessibilityFeaturesLink", IDS_OPTIONS_ACCESSIBILITY_FEATURES_LINK},
256 { "accessibilityTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, 257 {"accessibilityTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY},
257 { "advancedSectionTitleCertificates", 258 {"advancedSectionTitleCertificates",
258 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CERTIFICATES }, 259 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CERTIFICATES},
259 { "advancedSectionTitleCloudPrint", IDS_GOOGLE_CLOUD_PRINT }, 260 {"advancedSectionTitleCloudPrint", IDS_GOOGLE_CLOUD_PRINT},
260 { "advancedSectionTitleContent", 261 {"advancedSectionTitleContent", IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT},
261 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT }, 262 {"advancedSectionTitleLanguages",
262 { "advancedSectionTitleLanguages", 263 IDS_OPTIONS_ADVANCED_SECTION_TITLE_LANGUAGES},
263 IDS_OPTIONS_ADVANCED_SECTION_TITLE_LANGUAGES }, 264 {"advancedSectionTitleNetwork", IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK},
264 { "advancedSectionTitleNetwork", 265 {"advancedSectionTitlePrivacy", IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY},
265 IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK }, 266 {"advancedSectionTitleSystem", IDS_OPTIONS_ADVANCED_SECTION_TITLE_SYSTEM},
266 { "advancedSectionTitlePrivacy", 267 {"autoOpenFileTypesInfo", IDS_OPTIONS_OPEN_FILE_TYPES_AUTOMATICALLY},
267 IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY }, 268 {"autoOpenFileTypesResetToDefault",
268 { "advancedSectionTitleSystem", IDS_OPTIONS_ADVANCED_SECTION_TITLE_SYSTEM }, 269 IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT},
269 { "autoOpenFileTypesInfo", IDS_OPTIONS_OPEN_FILE_TYPES_AUTOMATICALLY }, 270 {"autofillEnabled", IDS_OPTIONS_AUTOFILL_ENABLE},
270 { "autoOpenFileTypesResetToDefault", 271 {"autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN},
271 IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT }, 272 {"certificatesManageButton", IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON},
272 { "autofillEnabled", IDS_OPTIONS_AUTOFILL_ENABLE }, 273 {"changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE},
273 { "autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN }, 274 {"childLabel", IDS_PROFILES_LIST_CHILD_LABEL},
274 { "certificatesManageButton", IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON }, 275 {"currentUserOnly", IDS_OPTIONS_CURRENT_USER_ONLY},
275 { "changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE }, 276 {"customizeSync", IDS_OPTIONS_CUSTOMIZE_SYNC_BUTTON_LABEL},
276 { "childLabel", IDS_PROFILES_LIST_CHILD_LABEL }, 277 {"defaultBrowserUnknown", IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN,
277 { "currentUserOnly", IDS_OPTIONS_CURRENT_USER_ONLY }, 278 IDS_PRODUCT_NAME},
278 { "customizeSync", IDS_OPTIONS_CUSTOMIZE_SYNC_BUTTON_LABEL }, 279 {"defaultBrowserUseAsDefault", IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT},
279 { "defaultBrowserUnknown", 280 {"defaultFontSizeLabel", IDS_OPTIONS_DEFAULT_FONT_SIZE_LABEL},
280 IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN, IDS_PRODUCT_NAME }, 281 {"defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES},
281 { "defaultBrowserUseAsDefault", IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT }, 282 {"defaultZoomFactorLabel", IDS_OPTIONS_DEFAULT_ZOOM_LEVEL_LABEL},
282 { "defaultFontSizeLabel", IDS_OPTIONS_DEFAULT_FONT_SIZE_LABEL }, 283 {"disableWebServices", IDS_OPTIONS_DISABLE_WEB_SERVICES},
283 { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES }, 284 {"doNotTrack", IDS_OPTIONS_ENABLE_DO_NOT_TRACK},
284 { "defaultZoomFactorLabel", IDS_OPTIONS_DEFAULT_ZOOM_LEVEL_LABEL }, 285 {"doNotTrackConfirmDisable",
285 { "disableWebServices", IDS_OPTIONS_DISABLE_WEB_SERVICES }, 286 IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_DISABLE},
286 { "doNotTrack", IDS_OPTIONS_ENABLE_DO_NOT_TRACK }, 287 {"doNotTrackConfirmEnable", IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_ENABLE},
287 { "doNotTrackConfirmDisable", 288 {"doNotTrackConfirmMessage", IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_TEXT},
288 IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_DISABLE }, 289 {"downloadLocationAskForSaveLocation",
289 { "doNotTrackConfirmEnable", 290 IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION},
290 IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_ENABLE }, 291 {"downloadLocationBrowseTitle", IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE},
291 { "doNotTrackConfirmMessage", IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_TEXT }, 292 {"downloadLocationChangeButton",
292 { "downloadLocationAskForSaveLocation", 293 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON},
293 IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION }, 294 {"downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME},
294 { "downloadLocationBrowseTitle", 295 {"easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION,
295 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE }, 296 device_type_resource_id},
296 { "downloadLocationChangeButton", 297 {"easyUnlockRequireProximityLabel",
297 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON }, 298 IDS_OPTIONS_EASY_UNLOCK_REQUIRE_PROXIMITY_LABEL, device_type_resource_id},
298 { "downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME }, 299 {"easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE},
299 { "easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION, 300 {"easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON},
300 device_type_resource_id }, 301 {"easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO,
301 { "easyUnlockRequireProximityLabel", 302 device_type_resource_id},
302 IDS_OPTIONS_EASY_UNLOCK_REQUIRE_PROXIMITY_LABEL, 303 {"enableLogging", enable_logging_resource_id},
303 device_type_resource_id }, 304 {"extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED},
304 { "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE }, 305 {"extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE},
305 { "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON }, 306 {"fontSettingsCustomizeFontsButton",
306 { "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO, 307 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON},
307 device_type_resource_id }, 308 {"fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM},
308 { "enableLogging", enable_logging_resource_id }, 309 {"fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE},
309 { "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED }, 310 {"fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM},
310 { "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE }, 311 {"fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL},
311 { "fontSettingsCustomizeFontsButton", 312 {"fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE},
312 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON }, 313 {"fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL},
313 { "fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM }, 314 {"googleNowLauncherEnable", IDS_OPTIONS_ENABLE_GOOGLE_NOW},
314 { "fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE }, 315 {"hideAdvancedSettings", IDS_SETTINGS_HIDE_ADVANCED_SETTINGS},
315 { "fontSizeLabelMedium", IDS_OPTIONS_FONT_SIZE_LABEL_MEDIUM }, 316 {"homePageNtp", IDS_OPTIONS_HOMEPAGE_NTP},
316 { "fontSizeLabelSmall", IDS_OPTIONS_FONT_SIZE_LABEL_SMALL }, 317 {"homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON},
317 { "fontSizeLabelVeryLarge", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_LARGE }, 318 {"homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB},
318 { "fontSizeLabelVerySmall", IDS_OPTIONS_FONT_SIZE_LABEL_VERY_SMALL }, 319 {"homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL},
319 { "googleNowLauncherEnable", IDS_OPTIONS_ENABLE_GOOGLE_NOW }, 320 {"hotwordAlwaysOnAudioHistoryDescription",
320 { "hideAdvancedSettings", IDS_SETTINGS_HIDE_ADVANCED_SETTINGS }, 321 IDS_HOTWORD_ALWAYS_ON_AUDIO_HISTORY_DESCRIPTION},
321 { "homePageNtp", IDS_OPTIONS_HOMEPAGE_NTP }, 322 {"hotwordAlwaysOnDesc", IDS_HOTWORD_SEARCH_ALWAYS_ON_DESCRIPTION},
322 { "homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON }, 323 {"hotwordAudioHistoryManage", IDS_HOTWORD_AUDIO_HISTORY_MANAGE_LINK},
323 { "homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB }, 324 {"hotwordAudioLoggingEnable", IDS_HOTWORD_AUDIO_LOGGING_ENABLE},
324 { "homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL }, 325 {"hotwordConfirmDisable", IDS_HOTWORD_CONFIRM_BUBBLE_DISABLE},
325 { "hotwordAlwaysOnAudioHistoryDescription", 326 {"hotwordConfirmEnable", IDS_HOTWORD_CONFIRM_BUBBLE_ENABLE},
326 IDS_HOTWORD_ALWAYS_ON_AUDIO_HISTORY_DESCRIPTION }, 327 {"hotwordConfirmMessage", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION},
327 { "hotwordAlwaysOnDesc", IDS_HOTWORD_SEARCH_ALWAYS_ON_DESCRIPTION }, 328 {"hotwordNoDSPDesc", IDS_HOTWORD_SEARCH_NO_DSP_DESCRIPTION},
328 { "hotwordAudioHistoryManage", IDS_HOTWORD_AUDIO_HISTORY_MANAGE_LINK }, 329 {"hotwordRetrainLink", IDS_HOTWORD_RETRAIN_LINK},
329 { "hotwordAudioLoggingEnable", IDS_HOTWORD_AUDIO_LOGGING_ENABLE }, 330 {"hotwordSearchEnable", IDS_HOTWORD_SEARCH_PREF_CHKBOX},
330 { "hotwordConfirmDisable", IDS_HOTWORD_CONFIRM_BUBBLE_DISABLE }, 331 {"importData", IDS_OPTIONS_IMPORT_DATA_BUTTON},
331 { "hotwordConfirmEnable", IDS_HOTWORD_CONFIRM_BUBBLE_ENABLE }, 332 {"improveBrowsingExperience", IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE},
332 { "hotwordConfirmMessage", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION }, 333 {"languageAndSpellCheckSettingsButton",
333 { "hotwordNoDSPDesc", IDS_HOTWORD_SEARCH_NO_DSP_DESCRIPTION }, 334 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS},
334 { "hotwordRetrainLink", IDS_HOTWORD_RETRAIN_LINK },
335 { "hotwordSearchEnable", IDS_HOTWORD_SEARCH_PREF_CHKBOX },
336 { "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON },
337 { "improveBrowsingExperience", IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE },
338 { "languageAndSpellCheckSettingsButton",
339 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS },
340 #if defined(OS_CHROMEOS) 335 #if defined(OS_CHROMEOS)
341 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, 336 {"languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL,
342 IDS_SHORT_PRODUCT_OS_NAME }, 337 IDS_SHORT_PRODUCT_OS_NAME},
343 #else 338 #else
344 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, 339 {"languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL,
345 IDS_SHORT_PRODUCT_NAME }, 340 IDS_SHORT_PRODUCT_NAME},
346 #endif 341 #endif
347 { "linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF }, 342 {"linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF},
348 { "manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK }, 343 {"manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK},
349 { "manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES }, 344 {"manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES},
350 { "managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK }, 345 {"managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK},
351 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART }, 346 {"metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART},
352 { "networkPredictionEnabledDescription", 347 {"networkPredictionEnabledDescription",
353 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, 348 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION},
354 { "passwordManagerEnabled", GetPasswordManagerSettingsStringId( 349 {"passwordManagerEnabled", GetPasswordManagerSettingsStringId(
355 ProfileSyncServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))) 350 ProfileSyncServiceFactory::GetForProfile(
356 }, 351 Profile::FromWebUI(web_ui())))},
357 { "passwordsAndAutofillGroupName", 352 {"passwordsAndAutofillGroupName",
358 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME }, 353 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME},
359 { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, 354 {"privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON},
360 { "privacyContentSettingsButton", 355 {"privacyContentSettingsButton",
361 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, 356 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON},
362 { "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE }, 357 {"profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE},
363 { "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE }, 358 {"profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE},
364 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, 359 {"profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL},
365 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, 360 {"profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL},
366 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, 361 {"profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL},
367 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, 362 {"profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT},
368 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, 363 {"profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL},
369 { "profilesSingleUser", IDS_PROFILES_SINGLE_USER_MESSAGE, 364 {"profilesSingleUser", IDS_PROFILES_SINGLE_USER_MESSAGE, IDS_PRODUCT_NAME},
370 IDS_PRODUCT_NAME }, 365 {"proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL},
371 { "proxiesLabelExtension", IDS_OPTIONS_EXTENSION_PROXIES_LABEL }, 366 {"proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL, IDS_PRODUCT_NAME},
372 { "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL, 367 {"resetProfileSettings", IDS_RESET_PROFILE_SETTINGS_BUTTON},
373 IDS_PRODUCT_NAME }, 368 {"resetProfileSettingsDescription", IDS_RESET_PROFILE_SETTINGS_DESCRIPTION},
374 { "resetProfileSettings", IDS_RESET_PROFILE_SETTINGS_BUTTON }, 369 {"resetProfileSettingsSectionTitle",
375 { "resetProfileSettingsDescription", 370 IDS_RESET_PROFILE_SETTINGS_SECTION_TITLE},
376 IDS_RESET_PROFILE_SETTINGS_DESCRIPTION }, 371 {"safeBrowsingEnableProtection", IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION},
377 { "resetProfileSettingsSectionTitle", 372 {"sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME},
378 IDS_RESET_PROFILE_SETTINGS_SECTION_TITLE }, 373 {"sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME},
379 { "safeBrowsingEnableProtection", 374 {"sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME},
380 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, 375 {"sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME},
381 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, 376 {"sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME},
382 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, 377 {"sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME},
383 { "sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME }, 378 {"sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME},
384 { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, 379 {"settingsTitle", IDS_SETTINGS_TITLE},
385 { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, 380 {"showAdvancedSettings", IDS_SETTINGS_SHOW_ADVANCED_SETTINGS},
386 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, 381 {"spellingConfirmDisable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_DISABLE},
387 { "sectionTitleUsers", IDS_PROFILES_OPTIONS_GROUP_NAME }, 382 {"spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE},
388 { "settingsTitle", IDS_SETTINGS_TITLE }, 383 {"spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT},
389 { "showAdvancedSettings", IDS_SETTINGS_SHOW_ADVANCED_SETTINGS }, 384 {"spellingPref", IDS_OPTIONS_SPELLING_PREF},
390 { "spellingConfirmDisable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_DISABLE }, 385 {"startupRestoreLastSession", IDS_OPTIONS_STARTUP_RESTORE_LAST_SESSION},
391 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, 386 {"startupSetPages", IDS_OPTIONS_STARTUP_SET_PAGES},
392 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, 387 {"startupShowNewTab", IDS_OPTIONS_STARTUP_SHOW_NEWTAB},
393 { "spellingPref", IDS_OPTIONS_SPELLING_PREF }, 388 {"startupShowPages", IDS_OPTIONS_STARTUP_SHOW_PAGES},
394 { "startupRestoreLastSession", IDS_OPTIONS_STARTUP_RESTORE_LAST_SESSION }, 389 {"suggestPref", IDS_OPTIONS_SUGGEST_PREF},
395 { "startupSetPages", IDS_OPTIONS_STARTUP_SET_PAGES }, 390 {"supervisedUserLabel", IDS_PROFILES_LIST_LEGACY_SUPERVISED_USER_LABEL},
396 { "startupShowNewTab", IDS_OPTIONS_STARTUP_SHOW_NEWTAB }, 391 {"syncButtonTextInProgress", IDS_SYNC_NTP_SETUP_IN_PROGRESS},
397 { "startupShowPages", IDS_OPTIONS_STARTUP_SHOW_PAGES }, 392 {"syncButtonTextSignIn", IDS_SYNC_START_SYNC_BUTTON_LABEL,
398 { "suggestPref", IDS_OPTIONS_SUGGEST_PREF }, 393 IDS_SHORT_PRODUCT_NAME},
399 { "supervisedUserLabel", IDS_PROFILES_LIST_LEGACY_SUPERVISED_USER_LABEL }, 394 {"syncButtonTextStop", IDS_SYNC_STOP_SYNCING_BUTTON_LABEL},
400 { "syncButtonTextInProgress", IDS_SYNC_NTP_SETUP_IN_PROGRESS }, 395 {"syncOverview", IDS_SYNC_OVERVIEW},
401 { "syncButtonTextSignIn", IDS_SYNC_START_SYNC_BUTTON_LABEL, 396 {"tabsToLinksPref", IDS_OPTIONS_TABS_TO_LINKS_PREF},
402 IDS_SHORT_PRODUCT_NAME }, 397 {"themesGallery", IDS_THEMES_GALLERY_BUTTON},
403 { "syncButtonTextStop", IDS_SYNC_STOP_SYNCING_BUTTON_LABEL }, 398 {"themesGalleryURL", IDS_THEMES_GALLERY_URL},
404 { "syncOverview", IDS_SYNC_OVERVIEW }, 399 {"themesReset", IDS_THEMES_RESET_BUTTON},
405 { "tabsToLinksPref", IDS_OPTIONS_TABS_TO_LINKS_PREF }, 400 {"toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR},
406 { "themesGallery", IDS_THEMES_GALLERY_BUTTON }, 401 {"toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON},
407 { "themesGalleryURL", IDS_THEMES_GALLERY_URL }, 402 {"translateEnableTranslate", IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE},
408 { "themesReset", IDS_THEMES_RESET_BUTTON },
409 { "toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR },
410 { "toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON },
411 { "translateEnableTranslate",
412 IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE },
413 #if defined(OS_CHROMEOS) 403 #if defined(OS_CHROMEOS)
414 { "accessibilityAlwaysShowMenu", 404 {"accessibilityAlwaysShowMenu",
415 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SHOULD_ALWAYS_SHOW_MENU }, 405 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SHOULD_ALWAYS_SHOW_MENU},
416 { "accessibilityAutoclick", 406 {"accessibilityAutoclick",
417 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DESCRIPTION }, 407 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DESCRIPTION},
418 { "accessibilityAutoclickDropdown", 408 {"accessibilityAutoclickDropdown",
419 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DROPDOWN_DESCRIPTION }, 409 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DROPDOWN_DESCRIPTION},
420 { "accessibilityCaretHighlight", 410 {"accessibilityCaretHighlight",
421 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_CARET_HIGHLIGHT_DESCRIPTION }, 411 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_CARET_HIGHLIGHT_DESCRIPTION},
422 { "accessibilityCursorHighlight", 412 {"accessibilityCursorHighlight",
423 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_CURSOR_HIGHLIGHT_DESCRIPTION }, 413 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_CURSOR_HIGHLIGHT_DESCRIPTION},
424 { "accessibilityExplanation", 414 {"accessibilityExplanation",
425 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_EXPLANATION }, 415 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_EXPLANATION},
426 { "accessibilityFocusHighlight", 416 {"accessibilityFocusHighlight",
427 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION }, 417 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION},
428 { "accessibilityHighContrast", 418 {"accessibilityHighContrast",
429 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_HIGH_CONTRAST_DESCRIPTION }, 419 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_HIGH_CONTRAST_DESCRIPTION},
430 { "accessibilityLargeCursor", 420 {"accessibilityLargeCursor",
431 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_LARGE_CURSOR_DESCRIPTION }, 421 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_LARGE_CURSOR_DESCRIPTION},
432 { "accessibilityScreenMagnifier", 422 {"accessibilityScreenMagnifier",
433 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_DESCRIPTION }, 423 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_DESCRIPTION},
434 { "accessibilityScreenMagnifierCenterFocus", 424 {"accessibilityScreenMagnifierCenterFocus",
435 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_CENTER_FOCUS }, 425 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_CENTER_FOCUS},
436 { "accessibilityScreenMagnifierFull", 426 {"accessibilityScreenMagnifierFull",
437 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_FULL }, 427 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_FULL},
438 { "accessibilityScreenMagnifierOff", 428 {"accessibilityScreenMagnifierOff",
439 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_OFF }, 429 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_OFF},
440 { "accessibilityScreenMagnifierPartial", 430 {"accessibilityScreenMagnifierPartial",
441 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL }, 431 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL},
442 { "accessibilitySelectToSpeak", 432 {"accessibilitySelectToSpeak",
443 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SELECT_TO_SPEAK_DESCRIPTION }, 433 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SELECT_TO_SPEAK_DESCRIPTION},
444 { "accessibilitySettings", 434 {"accessibilitySettings", IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SETTINGS},
445 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SETTINGS }, 435 {"accessibilitySpokenFeedback",
446 { "accessibilitySpokenFeedback", 436 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SPOKEN_FEEDBACK_DESCRIPTION},
447 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SPOKEN_FEEDBACK_DESCRIPTION }, 437 {"accessibilityStickyKeys",
448 { "accessibilityStickyKeys", 438 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION},
449 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION }, 439 {"accessibilitySwitchAccess",
450 { "accessibilitySwitchAccess", 440 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SWITCH_ACCESS_DESCRIPTION},
451 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SWITCH_ACCESS_DESCRIPTION }, 441 {"accessibilityTalkBackSettings",
452 { "accessibilityTalkBackSettings", 442 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_TALKBACK_SETTINGS},
453 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_TALKBACK_SETTINGS }, 443 {"accessibilityTapDragging",
454 { "accessibilityTapDragging", 444 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_TOUCHPAD_TAP_DRAGGING_DESCRIPTION},
455 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_TOUCHPAD_TAP_DRAGGING_DESCRIPTION }, 445 {"accessibilityVirtualKeyboard",
456 { "accessibilityVirtualKeyboard", 446 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION},
457 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION }, 447 {"accessibilityMonoAudio",
458 { "accessibilityMonoAudio", 448 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_MONO_AUDIO_DESCRIPTION},
459 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_MONO_AUDIO_DESCRIPTION}, 449 {"advancedSectionTitleCupsPrint",
460 { "advancedSectionTitleCupsPrint", 450 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CUPS_PRINT},
461 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CUPS_PRINT }, 451 {"androidAppsTitle", IDS_OPTIONS_ARC_TITLE},
462 { "androidAppsTitle", IDS_OPTIONS_ARC_TITLE }, 452 {"androidAppsEnabled", IDS_OPTIONS_ARC_ENABLE},
463 { "androidAppsEnabled", IDS_OPTIONS_ARC_ENABLE }, 453 {"androidAppsSettingsLabel", IDS_OPTIONS_ARC_MANAGE_APPS},
464 { "androidAppsSettingsLabel", IDS_OPTIONS_ARC_MANAGE_APPS }, 454 {"arcOptOutConfirmOverlayTabTitle", IDS_ARC_OPT_OUT_TAB_TITLE},
465 { "arcOptOutConfirmOverlayTabTitle", IDS_ARC_OPT_OUT_TAB_TITLE }, 455 {"arcOptOutDialogHeader", IDS_ARC_OPT_OUT_DIALOG_HEADER},
466 { "arcOptOutDialogHeader", IDS_ARC_OPT_OUT_DIALOG_HEADER }, 456 {"arcOptOutDialogDescription", IDS_ARC_OPT_OUT_DIALOG_DESCRIPTION},
467 { "arcOptOutDialogDescription", IDS_ARC_OPT_OUT_DIALOG_DESCRIPTION }, 457 {"arcOptOutDialogButtonConfirmDisable",
468 { "arcOptOutDialogButtonConfirmDisable", 458 IDS_ARC_OPT_OUT_DIALOG_BUTTON_CONFIRM_DISABLE},
469 IDS_ARC_OPT_OUT_DIALOG_BUTTON_CONFIRM_DISABLE }, 459 {"arcOptOutDialogButtonCancel", IDS_ARC_OPT_OUT_DIALOG_BUTTON_CANCEL},
470 { "arcOptOutDialogButtonCancel", IDS_ARC_OPT_OUT_DIALOG_BUTTON_CANCEL }, 460 {"autoclickDelayExtremelyShort",
471 { "autoclickDelayExtremelyShort", 461 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_EXTREMELY_SHORT},
472 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_EXTREMELY_SHORT }, 462 {"autoclickDelayLong",
473 { "autoclickDelayLong", 463 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_LONG},
474 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_LONG }, 464 {"autoclickDelayShort",
475 { "autoclickDelayShort", 465 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_SHORT},
476 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_SHORT }, 466 {"autoclickDelayVeryLong",
477 { "autoclickDelayVeryLong", 467 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_LONG},
478 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_LONG }, 468 {"autoclickDelayVeryShort",
479 { "autoclickDelayVeryShort", 469 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_SHORT},
480 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_SHORT }, 470 {"changePicture", IDS_OPTIONS_CHANGE_PICTURE},
481 { "changePicture", IDS_OPTIONS_CHANGE_PICTURE }, 471 {"changePictureCaption", IDS_OPTIONS_CHANGE_PICTURE_CAPTION},
482 { "changePictureCaption", IDS_OPTIONS_CHANGE_PICTURE_CAPTION }, 472 {"cupsPrintOptionLabel", IDS_OPTIONS_ADVANCED_SECTION_CUPS_PRINT_LABEL},
483 { "cupsPrintOptionLabel", IDS_OPTIONS_ADVANCED_SECTION_CUPS_PRINT_LABEL }, 473 {"cupsPrintersManageButton",
484 { "cupsPrintersManageButton", 474 IDS_OPTIONS_ADVANCED_SECTION_CUPS_PRINT_MANAGE_BUTTON},
485 IDS_OPTIONS_ADVANCED_SECTION_CUPS_PRINT_MANAGE_BUTTON }, 475 {"datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME},
486 { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME }, 476 {"deviceGroupDescription", IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION},
487 { "deviceGroupDescription", IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION }, 477 {"deviceGroupPointer", IDS_OPTIONS_DEVICE_GROUP_POINTER_SECTION},
488 { "deviceGroupPointer", IDS_OPTIONS_DEVICE_GROUP_POINTER_SECTION }, 478 {"disableGData", IDS_OPTIONS_DISABLE_GDATA},
489 { "disableGData", IDS_OPTIONS_DISABLE_GDATA }, 479 {"displayOptions", IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_BUTTON_LABEL},
490 { "displayOptions", IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_BUTTON_LABEL }, 480 {"enableContentProtectionAttestation",
491 { "enableContentProtectionAttestation", 481 IDS_OPTIONS_ENABLE_CONTENT_PROTECTION_ATTESTATION},
492 IDS_OPTIONS_ENABLE_CONTENT_PROTECTION_ATTESTATION }, 482 {"manageScreenlock", IDS_OPTIONS_MANAGE_SCREENLOCKER},
493 { "manageScreenlock", IDS_OPTIONS_MANAGE_SCREENLOCKER }, 483 {"factoryResetDataRestart", IDS_RELAUNCH_BUTTON},
494 { "factoryResetDataRestart", IDS_RELAUNCH_BUTTON }, 484 {"factoryResetDescription", IDS_OPTIONS_FACTORY_RESET_DESCRIPTION,
495 { "factoryResetDescription", IDS_OPTIONS_FACTORY_RESET_DESCRIPTION, 485 IDS_SHORT_PRODUCT_NAME},
496 IDS_SHORT_PRODUCT_NAME }, 486 {"factoryResetHeading", IDS_OPTIONS_FACTORY_RESET_HEADING},
497 { "factoryResetHeading", IDS_OPTIONS_FACTORY_RESET_HEADING }, 487 {"factoryResetHelpUrl", IDS_FACTORY_RESET_HELP_URL},
498 { "factoryResetHelpUrl", IDS_FACTORY_RESET_HELP_URL }, 488 {"factoryResetRestart", IDS_OPTIONS_FACTORY_RESET_BUTTON},
499 { "factoryResetRestart", IDS_OPTIONS_FACTORY_RESET_BUTTON }, 489 {"factoryResetTitle", IDS_OPTIONS_FACTORY_RESET},
500 { "factoryResetTitle", IDS_OPTIONS_FACTORY_RESET }, 490 {"factoryResetWarning", IDS_OPTIONS_FACTORY_RESET_WARNING},
501 { "factoryResetWarning", IDS_OPTIONS_FACTORY_RESET_WARNING }, 491 {"internetOptionsButtonTitle", IDS_OPTIONS_INTERNET_OPTIONS_BUTTON_TITLE},
502 { "internetOptionsButtonTitle", IDS_OPTIONS_INTERNET_OPTIONS_BUTTON_TITLE }, 492 {"keyboardSettingsButtonTitle",
503 { "keyboardSettingsButtonTitle", 493 IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE},
504 IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, 494 {"manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE},
505 { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE }, 495 {"mouseSpeed", IDS_OPTIONS_SETTINGS_MOUSE_SPEED_DESCRIPTION},
506 { "mouseSpeed", IDS_OPTIONS_SETTINGS_MOUSE_SPEED_DESCRIPTION }, 496 {"noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES},
507 { "noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES }, 497 {"confirm", IDS_CONFIRM},
508 { "confirm", IDS_CONFIRM }, 498 {"configurePinChoosePinTitle",
509 { "configurePinChoosePinTitle", 499 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CHOOSE_PIN_TITLE},
510 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CHOOSE_PIN_TITLE }, 500 {"configurePinConfirmPinTitle",
511 { "configurePinConfirmPinTitle", 501 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONFIRM_PIN_TITLE},
512 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONFIRM_PIN_TITLE }, 502 {"configurePinContinueButton",
513 { "configurePinContinueButton", 503 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONTINUE_BUTTON},
514 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONTINUE_BUTTON }, 504 {"configurePinMismatched", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_MISMATCHED},
515 { "configurePinMismatched", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_MISMATCHED }, 505 {"configurePinTooShort", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_TOO_SHORT},
516 { "configurePinTooShort", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_TOO_SHORT} , 506 {"configurePinWeakPin", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_WEAK_PIN},
517 { "configurePinWeakPin", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_WEAK_PIN }, 507 {"lockScreenChangePinButton",
518 { "lockScreenChangePinButton", 508 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CHANGE_PIN_BUTTON},
519 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CHANGE_PIN_BUTTON}, 509 {"lockScreenNone", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NONE},
520 { "lockScreenNone", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NONE }, 510 {"lockScreenPasswordOnly", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PASSWORD_ONLY},
521 { "lockScreenPasswordOnly", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PASSWORD_ONLY }, 511 {"lockScreenPinOrPassword",
522 { "lockScreenPinOrPassword", 512 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PIN_OR_PASSWORD},
523 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PIN_OR_PASSWORD }, 513 {"lockScreenSetupPinButton",
524 { "lockScreenSetupPinButton", 514 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_SETUP_PIN_BUTTON},
525 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_SETUP_PIN_BUTTON }, 515 {"lockScreenTitle", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_TITLE},
526 { "lockScreenTitle", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_TITLE }, 516 {"passwordPromptEnterPassword",
527 { "passwordPromptEnterPassword", 517 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_ENTER_PASSWORD},
528 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_ENTER_PASSWORD }, 518 {"passwordPromptInvalidPassword",
529 { "passwordPromptInvalidPassword", 519 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_INVALID_PASSWORD},
530 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_INVALID_PASSWORD }, 520 {"passwordPromptPasswordLabel",
531 { "passwordPromptPasswordLabel", 521 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_PASSWORD_LABEL},
532 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_PASSWORD_LABEL }, 522 {"passwordPromptTitle", IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_TITLE},
533 { "passwordPromptTitle", IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_TITLE }, 523 {"pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN},
534 { "pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN }, 524 {"pinKeyboardPlaceholderPinPassword",
535 { "pinKeyboardPlaceholderPinPassword", 525 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD},
536 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD }, 526 {"pinKeyboardDeleteAccessibleName",
537 { "pinKeyboardDeleteAccessibleName", 527 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME},
538 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME }, 528 {"powerSettingsButton", IDS_OPTIONS_DEVICE_GROUP_POWER_SETTINGS_BUTTON},
539 { "powerSettingsButton", 529 {"resolveTimezoneByGeoLocation",
540 IDS_OPTIONS_DEVICE_GROUP_POWER_SETTINGS_BUTTON }, 530 IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION},
541 { "resolveTimezoneByGeoLocation", 531 {"sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME},
542 IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION }, 532 {"sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL},
543 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, 533 {"storageManagerButtonTitle",
544 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, 534 IDS_OPTIONS_DEVICE_GROUP_STORAGE_MANAGER_BUTTON_TITLE},
545 { "storageManagerButtonTitle", 535 {"syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL},
546 IDS_OPTIONS_DEVICE_GROUP_STORAGE_MANAGER_BUTTON_TITLE }, 536 {"thirdPartyImeConfirmDisable", IDS_CANCEL},
547 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL }, 537 {"thirdPartyImeConfirmEnable", IDS_OK},
548 { "thirdPartyImeConfirmDisable", IDS_CANCEL }, 538 {"thirdPartyImeConfirmMessage",
549 { "thirdPartyImeConfirmEnable", IDS_OK }, 539 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_MESSAGE},
550 { "thirdPartyImeConfirmMessage", 540 {"timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION},
551 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_MESSAGE }, 541 {"touchpadSpeed", IDS_OPTIONS_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION},
552 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, 542 {"use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION},
553 { "touchpadSpeed", IDS_OPTIONS_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION }, 543 {"wakeOnWifiLabel", IDS_OPTIONS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION},
554 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION },
555 { "wakeOnWifiLabel", IDS_OPTIONS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION },
556 #else 544 #else
557 { "gpuModeCheckbox", 545 {"gpuModeCheckbox", IDS_OPTIONS_SYSTEM_ENABLE_HARDWARE_ACCELERATION_MODE},
558 IDS_OPTIONS_SYSTEM_ENABLE_HARDWARE_ACCELERATION_MODE }, 546 {"gpuModeResetRestart",
559 { "gpuModeResetRestart", 547 IDS_OPTIONS_SYSTEM_ENABLE_HARDWARE_ACCELERATION_MODE_RESTART},
560 IDS_OPTIONS_SYSTEM_ENABLE_HARDWARE_ACCELERATION_MODE_RESTART }, 548 {"proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON},
561 { "proxiesConfigureButton", IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON }, 549 {"syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL},
562 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL },
563 #endif // defined(OS_CHROMEOS) 550 #endif // defined(OS_CHROMEOS)
564 551
565 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 552 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
566 { "showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS }, 553 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
567 { "themesNativeButton", IDS_THEMES_GTK_BUTTON }, 554 {"themesNativeButton", IDS_THEMES_GTK_BUTTON},
568 { "themesSetClassic", IDS_THEMES_SET_CLASSIC }, 555 {"themesSetClassic", IDS_THEMES_SET_CLASSIC},
569 #else 556 #else
570 { "themes", IDS_THEMES_GROUP_NAME }, 557 {"themes", IDS_THEMES_GROUP_NAME},
571 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) 558 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
572 559
573 #if defined(OS_CHROMEOS) && defined(USE_ASH) 560 #if defined(OS_CHROMEOS) && defined(USE_ASH)
574 { "setWallpaper", IDS_SET_WALLPAPER_BUTTON }, 561 {"setWallpaper", IDS_SET_WALLPAPER_BUTTON},
575 #endif // defined(OS_CHROMEOS) && defined(USE_ASH) 562 #endif // defined(OS_CHROMEOS) && defined(USE_ASH)
576 563
577 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) 564 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
578 { "backgroundModeCheckbox", IDS_OPTIONS_SYSTEM_ENABLE_BACKGROUND_MODE }, 565 {"backgroundModeCheckbox", IDS_OPTIONS_SYSTEM_ENABLE_BACKGROUND_MODE},
579 #endif // defined(OS_MACOSX) && !defined(OS_CHROMEOS) 566 #endif // defined(OS_MACOSX) && !defined(OS_CHROMEOS)
580 567
581 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 568 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
582 { "cloudPrintDevicesPageButton", IDS_LOCAL_DISCOVERY_DEVICES_PAGE_BUTTON }, 569 {"cloudPrintDevicesPageButton", IDS_LOCAL_DISCOVERY_DEVICES_PAGE_BUTTON},
583 { "cloudPrintEnableNotificationsLabel", 570 {"cloudPrintEnableNotificationsLabel",
584 IDS_LOCAL_DISCOVERY_NOTIFICATIONS_ENABLE_CHECKBOX_LABEL }, 571 IDS_LOCAL_DISCOVERY_NOTIFICATIONS_ENABLE_CHECKBOX_LABEL},
585 #endif 572 #endif
586 }; 573 };
587 574
588 RegisterStrings(values, resources, arraysize(resources)); 575 RegisterStrings(values, resources, arraysize(resources));
589 RegisterTitle(values, "doNotTrackConfirmOverlay", 576 RegisterTitle(values, "doNotTrackConfirmOverlay",
590 IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_TITLE); 577 IDS_OPTIONS_ENABLE_DO_NOT_TRACK_BUBBLE_TITLE);
591 RegisterTitle(values, "spellingConfirmOverlay", 578 RegisterTitle(values, "spellingConfirmOverlay",
592 IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE); 579 IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE);
593 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 580 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
594 RegisterCloudPrintValues(values); 581 RegisterCloudPrintValues(values);
(...skipping 12 matching lines...) Expand all
607 "defaultSearchGroupLabel", 594 "defaultSearchGroupLabel",
608 l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url)); 595 l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url));
609 values->SetString("hotwordLearnMoreURL", chrome::kHotwordLearnMoreURL); 596 values->SetString("hotwordLearnMoreURL", chrome::kHotwordLearnMoreURL);
610 RegisterTitle(values, "hotwordConfirmOverlay", 597 RegisterTitle(values, "hotwordConfirmOverlay",
611 IDS_HOTWORD_CONFIRM_BUBBLE_TITLE); 598 IDS_HOTWORD_CONFIRM_BUBBLE_TITLE);
612 values->SetString("hotwordManageAudioHistoryURL", 599 values->SetString("hotwordManageAudioHistoryURL",
613 chrome::kManageAudioHistoryURL); 600 chrome::kManageAudioHistoryURL);
614 base::string16 supervised_user_dashboard = 601 base::string16 supervised_user_dashboard =
615 base::ASCIIToUTF16(chrome::kLegacySupervisedUserManagementURL); 602 base::ASCIIToUTF16(chrome::kLegacySupervisedUserManagementURL);
616 values->SetString("profilesSupervisedDashboardTip", 603 values->SetString("profilesSupervisedDashboardTip",
617 l10n_util::GetStringFUTF16( 604 l10n_util::GetStringFUTF16(
618 IDS_PROFILES_LEGACY_SUPERVISED_USER_DASHBOARD_TIP, 605 IDS_PROFILES_LEGACY_SUPERVISED_USER_DASHBOARD_TIP,
619 supervised_user_dashboard)); 606 supervised_user_dashboard));
620 607
621 #if defined(OS_CHROMEOS) 608 #if defined(OS_CHROMEOS)
622 std::string username = profile->GetProfileUserName(); 609 std::string username = profile->GetProfileUserName();
623 if (username.empty()) { 610 if (username.empty()) {
624 const user_manager::User* user = 611 const user_manager::User* user =
625 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 612 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
626 if (user && (user->GetType() != user_manager::USER_TYPE_GUEST)) 613 if (user && (user->GetType() != user_manager::USER_TYPE_GUEST))
627 username = user->GetAccountId().GetUserEmail(); 614 username = user->GetAccountId().GetUserEmail();
628 } 615 }
629 if (!username.empty()) 616 if (!username.empty())
(...skipping 14 matching lines...) Expand all
644 631
645 #if defined(OS_CHROMEOS) 632 #if defined(OS_CHROMEOS)
646 // TODO(pastarmovj): replace this with a call to the CrosSettings list 633 // TODO(pastarmovj): replace this with a call to the CrosSettings list
647 // handling functionality to come. 634 // handling functionality to come.
648 values->Set("timezoneList", chromeos::system::GetTimezoneList().release()); 635 values->Set("timezoneList", chromeos::system::GetTimezoneList().release());
649 636
650 values->SetString("accessibilityLearnMoreURL", 637 values->SetString("accessibilityLearnMoreURL",
651 chrome::kChromeAccessibilityHelpURL); 638 chrome::kChromeAccessibilityHelpURL);
652 639
653 std::string settings_url = std::string("chrome-extension://") + 640 std::string settings_url = std::string("chrome-extension://") +
654 extension_misc::kChromeVoxExtensionId + 641 extension_misc::kChromeVoxExtensionId +
655 chrome::kChromeAccessibilitySettingsURL; 642 chrome::kChromeAccessibilitySettingsURL;
656 643
657 values->SetString("accessibilitySettingsURL", 644 values->SetString("accessibilitySettingsURL", settings_url);
658 settings_url);
659 645
660 values->SetString("contentProtectionAttestationLearnMoreURL", 646 values->SetString("contentProtectionAttestationLearnMoreURL",
661 chrome::kAttestationForContentProtectionLearnMoreURL); 647 chrome::kAttestationForContentProtectionLearnMoreURL);
662 648
663 // Creates magnifierList. 649 // Creates magnifierList.
664 std::unique_ptr<base::ListValue> magnifier_list(new base::ListValue); 650 std::unique_ptr<base::ListValue> magnifier_list(new base::ListValue);
665 651
666 std::unique_ptr<base::ListValue> option_full(new base::ListValue); 652 std::unique_ptr<base::ListValue> option_full(new base::ListValue);
667 option_full->AppendInteger(ash::MAGNIFIER_FULL); 653 option_full->AppendInteger(ash::MAGNIFIER_FULL);
668 option_full->AppendString(l10n_util::GetStringUTF16( 654 option_full->AppendString(l10n_util::GetStringUTF16(
669 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_FULL)); 655 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_FULL));
670 magnifier_list->Append(std::move(option_full)); 656 magnifier_list->Append(std::move(option_full));
671 657
672 std::unique_ptr<base::ListValue> option_partial(new base::ListValue); 658 std::unique_ptr<base::ListValue> option_partial(new base::ListValue);
673 option_partial->AppendInteger(ash::MAGNIFIER_PARTIAL); 659 option_partial->AppendInteger(ash::MAGNIFIER_PARTIAL);
674 option_partial->AppendString(l10n_util::GetStringUTF16( 660 option_partial->AppendString(l10n_util::GetStringUTF16(
675 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL)); 661 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL));
676 magnifier_list->Append(std::move(option_partial)); 662 magnifier_list->Append(std::move(option_partial));
677 663
678 values->Set("magnifierList", magnifier_list.release()); 664 values->Set("magnifierList", magnifier_list.release());
679 #endif 665 #endif
680 666
681 #if defined(OS_MACOSX) 667 #if defined(OS_MACOSX)
682 values->SetString("macPasswordsWarning", 668 values->SetString(
669 "macPasswordsWarning",
683 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); 670 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING));
684 values->SetBoolean("multiple_profiles", 671 values->SetBoolean(
672 "multiple_profiles",
685 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); 673 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1);
686 #endif 674 #endif
687 675
688 if (ShouldShowMultiProfilesUserList()) 676 if (ShouldShowMultiProfilesUserList())
689 values->Set("profilesInfo", GetProfilesInfoList().release()); 677 values->Set("profilesInfo", GetProfilesInfoList().release());
690 678
691 // Profile deletion is not allowed for any users using Metro mode. 679 // Profile deletion is not allowed for any users using Metro mode.
692 bool allow_deletion = true; 680 bool allow_deletion = true;
693 #if defined(USE_ASH) 681 #if defined(USE_ASH)
694 allow_deletion = allow_deletion && !ash::WmShell::HasInstance(); 682 allow_deletion = allow_deletion && !ash::WmShell::HasInstance();
(...skipping 14 matching lines...) Expand all
709 ::switches::kEnableNativeCups)); 697 ::switches::kEnableNativeCups));
710 values->SetString("cupsPrintLearnMoreURL", 698 values->SetString("cupsPrintLearnMoreURL",
711 chrome::kChromeUIMdCupsSettingsURL); 699 chrome::kChromeUIMdCupsSettingsURL);
712 #endif // defined(OS_CHROMEOS) 700 #endif // defined(OS_CHROMEOS)
713 701
714 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 702 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
715 values->SetBoolean("cloudPrintHideNotificationsCheckbox", 703 values->SetBoolean("cloudPrintHideNotificationsCheckbox",
716 !cloud_print::PrivetNotificationService::IsEnabled()); 704 !cloud_print::PrivetNotificationService::IsEnabled());
717 #endif 705 #endif
718 706
719 values->SetBoolean("cloudPrintShowMDnsOptions", 707 values->SetBoolean("cloudPrintShowMDnsOptions", cloud_print_mdns_ui_enabled_);
720 cloud_print_mdns_ui_enabled_);
721 708
722 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL); 709 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL);
723 710
724 values->SetString("languagesLearnMoreURL", 711 values->SetString("languagesLearnMoreURL",
725 chrome::kLanguageSettingsLearnMoreUrl); 712 chrome::kLanguageSettingsLearnMoreUrl);
726 713
727 values->SetBoolean( 714 values->SetBoolean("easyUnlockAllowed",
728 "easyUnlockAllowed", EasyUnlockService::Get(profile)->IsAllowed()); 715 EasyUnlockService::Get(profile)->IsAllowed());
729 values->SetString("easyUnlockLearnMoreURL", chrome::kEasyUnlockLearnMoreUrl); 716 values->SetString("easyUnlockLearnMoreURL", chrome::kEasyUnlockLearnMoreUrl);
730 values->SetBoolean("easyUnlockProximityDetectionAllowed", 717 values->SetBoolean("easyUnlockProximityDetectionAllowed",
731 base::CommandLine::ForCurrentProcess()->HasSwitch( 718 base::CommandLine::ForCurrentProcess()->HasSwitch(
732 proximity_auth::switches::kEnableProximityDetection)); 719 proximity_auth::switches::kEnableProximityDetection));
733 720
734 #if defined(OS_CHROMEOS) 721 #if defined(OS_CHROMEOS)
735 RegisterTitle(values, "thirdPartyImeConfirmOverlay", 722 RegisterTitle(values, "thirdPartyImeConfirmOverlay",
736 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); 723 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE);
737 values->SetBoolean("usingNewProfilesUI", false); 724 values->SetBoolean("usingNewProfilesUI", false);
738 #else 725 #else
739 values->SetBoolean("usingNewProfilesUI", true); 726 values->SetBoolean("usingNewProfilesUI", true);
740 #endif 727 #endif
741 728
742 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); 729 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser());
743 730
744 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); 731 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings());
745 732
746 #if defined(OS_CHROMEOS) 733 #if defined(OS_CHROMEOS)
747 values->SetBoolean( 734 values->SetBoolean(
748 "showWakeOnWifi", 735 "showWakeOnWifi",
749 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && 736 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() &&
750 chromeos::switches::WakeOnWifiEnabled()); 737 chromeos::switches::WakeOnWifiEnabled());
751 values->SetBoolean("enableTimeZoneTrackingOption", 738 values->SetBoolean("enableTimeZoneTrackingOption",
752 !chromeos::system::HasSystemTimezonePolicy()); 739 !chromeos::system::HasSystemTimezonePolicy());
753 values->SetBoolean("resolveTimezoneByGeolocationInitialValue", 740 values->SetBoolean(
741 "resolveTimezoneByGeolocationInitialValue",
754 profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation)); 742 profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation));
755 values->SetBoolean("enableLanguageOptionsImeMenu", 743 values->SetBoolean("enableLanguageOptionsImeMenu",
756 base::FeatureList::IsEnabled(features::kOptInImeMenu)); 744 base::FeatureList::IsEnabled(features::kOptInImeMenu));
757 values->SetBoolean( 745 values->SetBoolean(
758 "enableExperimentalAccessibilityFeatures", 746 "enableExperimentalAccessibilityFeatures",
759 base::CommandLine::ForCurrentProcess()->HasSwitch( 747 base::CommandLine::ForCurrentProcess()->HasSwitch(
760 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 748 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
761 749
762 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 750 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
763 bool allow_bluetooth = true; 751 bool allow_bluetooth = true;
(...skipping 29 matching lines...) Expand all
793 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); 781 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
794 } 782 }
795 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) 783 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
796 784
797 void BrowserOptionsHandler::RegisterMessages() { 785 void BrowserOptionsHandler::RegisterMessages() {
798 web_ui()->RegisterMessageCallback( 786 web_ui()->RegisterMessageCallback(
799 "setDefaultSearchEngine", 787 "setDefaultSearchEngine",
800 base::Bind(&BrowserOptionsHandler::SetDefaultSearchEngine, 788 base::Bind(&BrowserOptionsHandler::SetDefaultSearchEngine,
801 base::Unretained(this))); 789 base::Unretained(this)));
802 web_ui()->RegisterMessageCallback( 790 web_ui()->RegisterMessageCallback(
803 "deleteProfile", 791 "deleteProfile", base::Bind(&BrowserOptionsHandler::DeleteProfile,
804 base::Bind(&BrowserOptionsHandler::DeleteProfile, 792 base::Unretained(this)));
805 base::Unretained(this)));
806 web_ui()->RegisterMessageCallback( 793 web_ui()->RegisterMessageCallback(
807 "themesReset", 794 "themesReset",
808 base::Bind(&BrowserOptionsHandler::ThemesReset, 795 base::Bind(&BrowserOptionsHandler::ThemesReset, base::Unretained(this)));
809 base::Unretained(this)));
810 web_ui()->RegisterMessageCallback( 796 web_ui()->RegisterMessageCallback(
811 "requestProfilesInfo", 797 "requestProfilesInfo",
812 base::Bind(&BrowserOptionsHandler::HandleRequestProfilesInfo, 798 base::Bind(&BrowserOptionsHandler::HandleRequestProfilesInfo,
813 base::Unretained(this))); 799 base::Unretained(this)));
814 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 800 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
815 web_ui()->RegisterMessageCallback( 801 web_ui()->RegisterMessageCallback(
816 "themesSetNative", 802 "themesSetNative", base::Bind(&BrowserOptionsHandler::ThemesSetNative,
817 base::Bind(&BrowserOptionsHandler::ThemesSetNative, 803 base::Unretained(this)));
818 base::Unretained(this)));
819 #endif 804 #endif
820 web_ui()->RegisterMessageCallback( 805 web_ui()->RegisterMessageCallback(
821 "selectDownloadLocation", 806 "selectDownloadLocation",
822 base::Bind(&BrowserOptionsHandler::HandleSelectDownloadLocation, 807 base::Bind(&BrowserOptionsHandler::HandleSelectDownloadLocation,
823 base::Unretained(this))); 808 base::Unretained(this)));
824 web_ui()->RegisterMessageCallback( 809 web_ui()->RegisterMessageCallback(
825 "autoOpenFileTypesAction", 810 "autoOpenFileTypesAction",
826 base::Bind(&BrowserOptionsHandler::HandleAutoOpenButton, 811 base::Bind(&BrowserOptionsHandler::HandleAutoOpenButton,
827 base::Unretained(this))); 812 base::Unretained(this)));
828 web_ui()->RegisterMessageCallback( 813 web_ui()->RegisterMessageCallback(
(...skipping 13 matching lines...) Expand all
842 #if defined(OS_CHROMEOS) 827 #if defined(OS_CHROMEOS)
843 web_ui()->RegisterMessageCallback( 828 web_ui()->RegisterMessageCallback(
844 "openWallpaperManager", 829 "openWallpaperManager",
845 base::Bind(&BrowserOptionsHandler::HandleOpenWallpaperManager, 830 base::Bind(&BrowserOptionsHandler::HandleOpenWallpaperManager,
846 base::Unretained(this))); 831 base::Unretained(this)));
847 web_ui()->RegisterMessageCallback( 832 web_ui()->RegisterMessageCallback(
848 "virtualKeyboardChange", 833 "virtualKeyboardChange",
849 base::Bind(&BrowserOptionsHandler::VirtualKeyboardChangeCallback, 834 base::Bind(&BrowserOptionsHandler::VirtualKeyboardChangeCallback,
850 base::Unretained(this))); 835 base::Unretained(this)));
851 web_ui()->RegisterMessageCallback( 836 web_ui()->RegisterMessageCallback(
852 "onPowerwashDialogShow", 837 "onPowerwashDialogShow",
853 base::Bind(&BrowserOptionsHandler::OnPowerwashDialogShow, 838 base::Bind(&BrowserOptionsHandler::OnPowerwashDialogShow,
854 base::Unretained(this))); 839 base::Unretained(this)));
855 web_ui()->RegisterMessageCallback( 840 web_ui()->RegisterMessageCallback(
856 "performFactoryResetRestart", 841 "performFactoryResetRestart",
857 base::Bind(&BrowserOptionsHandler::PerformFactoryResetRestart, 842 base::Bind(&BrowserOptionsHandler::PerformFactoryResetRestart,
858 base::Unretained(this))); 843 base::Unretained(this)));
859 web_ui()->RegisterMessageCallback( 844 web_ui()->RegisterMessageCallback(
860 "showAndroidAppsSettings", 845 "showAndroidAppsSettings",
861 base::Bind(&BrowserOptionsHandler::ShowAndroidAppsSettings, 846 base::Bind(&BrowserOptionsHandler::ShowAndroidAppsSettings,
862 base::Unretained(this))); 847 base::Unretained(this)));
863 web_ui()->RegisterMessageCallback( 848 web_ui()->RegisterMessageCallback(
864 "showAccessibilityTalkBackSettings", 849 "showAccessibilityTalkBackSettings",
865 base::Bind(&BrowserOptionsHandler::ShowAccessibilityTalkBackSettings, 850 base::Bind(&BrowserOptionsHandler::ShowAccessibilityTalkBackSettings,
866 base::Unretained(this))); 851 base::Unretained(this)));
867 web_ui()->RegisterMessageCallback( 852 web_ui()->RegisterMessageCallback(
868 "showCupsPrintDevicesPage", 853 "showCupsPrintDevicesPage",
869 base::Bind(&BrowserOptionsHandler::ShowCupsPrintDevicesPage, 854 base::Bind(&BrowserOptionsHandler::ShowCupsPrintDevicesPage,
870 base::Unretained(this))); 855 base::Unretained(this)));
871 #else 856 #else
872 web_ui()->RegisterMessageCallback( 857 web_ui()->RegisterMessageCallback(
873 "becomeDefaultBrowser", 858 "becomeDefaultBrowser",
874 base::Bind(&BrowserOptionsHandler::BecomeDefaultBrowser, 859 base::Bind(&BrowserOptionsHandler::BecomeDefaultBrowser,
875 base::Unretained(this))); 860 base::Unretained(this)));
876 web_ui()->RegisterMessageCallback( 861 web_ui()->RegisterMessageCallback(
877 "restartBrowser", 862 "restartBrowser", base::Bind(&BrowserOptionsHandler::HandleRestartBrowser,
878 base::Bind(&BrowserOptionsHandler::HandleRestartBrowser, 863 base::Unretained(this)));
879 base::Unretained(this)));
880 web_ui()->RegisterMessageCallback( 864 web_ui()->RegisterMessageCallback(
881 "showNetworkProxySettings", 865 "showNetworkProxySettings",
882 base::Bind(&BrowserOptionsHandler::ShowNetworkProxySettings, 866 base::Bind(&BrowserOptionsHandler::ShowNetworkProxySettings,
883 base::Unretained(this))); 867 base::Unretained(this)));
884 #endif // defined(OS_CHROMEOS) 868 #endif // defined(OS_CHROMEOS)
885 869
886 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 870 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
887 if (cloud_print_mdns_ui_enabled_) { 871 if (cloud_print_mdns_ui_enabled_) {
888 web_ui()->RegisterMessageCallback( 872 web_ui()->RegisterMessageCallback(
889 "showCloudPrintDevicesPage", 873 "showCloudPrintDevicesPage",
(...skipping 13 matching lines...) Expand all
903 887
904 web_ui()->RegisterMessageCallback( 888 web_ui()->RegisterMessageCallback(
905 "launchHotwordAudioVerificationApp", 889 "launchHotwordAudioVerificationApp",
906 base::Bind( 890 base::Bind(
907 &BrowserOptionsHandler::HandleLaunchHotwordAudioVerificationApp, 891 &BrowserOptionsHandler::HandleLaunchHotwordAudioVerificationApp,
908 base::Unretained(this))); 892 base::Unretained(this)));
909 893
910 web_ui()->RegisterMessageCallback( 894 web_ui()->RegisterMessageCallback(
911 "launchEasyUnlockSetup", 895 "launchEasyUnlockSetup",
912 base::Bind(&BrowserOptionsHandler::HandleLaunchEasyUnlockSetup, 896 base::Bind(&BrowserOptionsHandler::HandleLaunchEasyUnlockSetup,
913 base::Unretained(this))); 897 base::Unretained(this)));
914 #if defined(OS_WIN) 898 #if defined(OS_WIN)
915 web_ui()->RegisterMessageCallback( 899 web_ui()->RegisterMessageCallback(
916 "refreshExtensionControlIndicators", 900 "refreshExtensionControlIndicators",
917 base::Bind( 901 base::Bind(
918 &BrowserOptionsHandler::HandleRefreshExtensionControlIndicators, 902 &BrowserOptionsHandler::HandleRefreshExtensionControlIndicators,
919 base::Unretained(this))); 903 base::Unretained(this)));
920 #endif // defined(OS_WIN) 904 #endif // defined(OS_WIN)
921 web_ui()->RegisterMessageCallback("metricsReportingCheckboxChanged", 905 web_ui()->RegisterMessageCallback(
906 "metricsReportingCheckboxChanged",
922 base::Bind(&BrowserOptionsHandler::HandleMetricsReportingChange, 907 base::Bind(&BrowserOptionsHandler::HandleMetricsReportingChange,
923 base::Unretained(this))); 908 base::Unretained(this)));
924 909
925 web_ui()->RegisterMessageCallback( 910 web_ui()->RegisterMessageCallback(
926 "safeBrowsingExtendedReportingAction", 911 "safeBrowsingExtendedReportingAction",
927 base::Bind(&BrowserOptionsHandler::HandleSafeBrowsingExtendedReporting, 912 base::Bind(&BrowserOptionsHandler::HandleSafeBrowsingExtendedReporting,
928 base::Unretained(this))); 913 base::Unretained(this)));
929 } 914 }
930 915
931 void BrowserOptionsHandler::Uninitialize() { 916 void BrowserOptionsHandler::Uninitialize() {
932 registrar_.RemoveAll(); 917 registrar_.RemoveAll();
933 g_browser_process->profile_manager()-> 918 g_browser_process->profile_manager()
934 GetProfileAttributesStorage().RemoveObserver(this); 919 ->GetProfileAttributesStorage()
920 .RemoveObserver(this);
935 #if defined(OS_WIN) 921 #if defined(OS_WIN)
936 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->RemoveObserver(this); 922 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->RemoveObserver(this);
937 #endif 923 #endif
938 #if defined(OS_CHROMEOS) 924 #if defined(OS_CHROMEOS)
939 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get( 925 ArcAppListPrefs* arc_prefs =
940 Profile::FromWebUI(web_ui())); 926 ArcAppListPrefs::Get(Profile::FromWebUI(web_ui()));
941 if (arc_prefs) 927 if (arc_prefs)
942 arc_prefs->RemoveObserver(this); 928 arc_prefs->RemoveObserver(this);
943 #endif 929 #endif
944 } 930 }
945 931
946 void BrowserOptionsHandler::OnStateChanged() { 932 void BrowserOptionsHandler::OnStateChanged() {
947 UpdateSyncState(); 933 UpdateSyncState();
948 } 934 }
949 935
950 void BrowserOptionsHandler::GoogleSigninSucceeded(const std::string& account_id, 936 void BrowserOptionsHandler::GoogleSigninSucceeded(const std::string& account_id,
(...skipping 20 matching lines...) Expand all
971 // if the profile is able to change these preference types. 957 // if the profile is able to change these preference types.
972 DCHECK(zoom_level_prefs || 958 DCHECK(zoom_level_prefs ||
973 profile->GetProfileType() != Profile::REGULAR_PROFILE); 959 profile->GetProfileType() != Profile::REGULAR_PROFILE);
974 if (zoom_level_prefs) { 960 if (zoom_level_prefs) {
975 default_zoom_level_subscription_ = 961 default_zoom_level_subscription_ =
976 zoom_level_prefs->RegisterDefaultZoomLevelCallback( 962 zoom_level_prefs->RegisterDefaultZoomLevelCallback(
977 base::Bind(&BrowserOptionsHandler::SetupPageZoomSelector, 963 base::Bind(&BrowserOptionsHandler::SetupPageZoomSelector,
978 base::Unretained(this))); 964 base::Unretained(this)));
979 } 965 }
980 966
981 g_browser_process->policy_service()->AddObserver( 967 g_browser_process->policy_service()->AddObserver(policy::POLICY_DOMAIN_CHROME,
982 policy::POLICY_DOMAIN_CHROME, this); 968 this);
983 969
984 g_browser_process->profile_manager()-> 970 g_browser_process->profile_manager()
985 GetProfileAttributesStorage().AddObserver(this); 971 ->GetProfileAttributesStorage()
972 .AddObserver(this);
986 973
987 browser_sync::ProfileSyncService* sync_service( 974 browser_sync::ProfileSyncService* sync_service(
988 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); 975 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile));
989 // TODO(blundell): Use a ScopedObserver to observe the PSS so that cleanup on 976 // TODO(blundell): Use a ScopedObserver to observe the PSS so that cleanup on
990 // destruction is automatic. 977 // destruction is automatic.
991 if (sync_service) 978 if (sync_service)
992 sync_service->AddObserver(this); 979 sync_service->AddObserver(this);
993 980
994 SigninManagerBase* signin_manager( 981 SigninManagerBase* signin_manager(
995 SigninManagerFactory::GetInstance()->GetForProfile(profile)); 982 SigninManagerFactory::GetInstance()->GetForProfile(profile));
996 if (signin_manager) 983 if (signin_manager)
997 signin_observer_.Add(signin_manager); 984 signin_observer_.Add(signin_manager);
998 985
999 // Create our favicon data source. 986 // Create our favicon data source.
1000 content::URLDataSource::Add( 987 content::URLDataSource::Add(
1001 profile, new FaviconSource(profile, FaviconSource::FAVICON)); 988 profile, new FaviconSource(profile, FaviconSource::FAVICON));
1002 989
1003 #if !defined(OS_CHROMEOS) 990 #if !defined(OS_CHROMEOS)
1004 default_browser_policy_.Init( 991 default_browser_policy_.Init(
1005 prefs::kDefaultBrowserSettingEnabled, 992 prefs::kDefaultBrowserSettingEnabled, g_browser_process->local_state(),
1006 g_browser_process->local_state(),
1007 base::Bind(&BrowserOptionsHandler::UpdateDefaultBrowserState, 993 base::Bind(&BrowserOptionsHandler::UpdateDefaultBrowserState,
1008 base::Unretained(this))); 994 base::Unretained(this)));
1009 #endif 995 #endif
1010 996
1011 #if defined(OS_CHROMEOS) 997 #if defined(OS_CHROMEOS)
1012 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, 998 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
1013 content::NotificationService::AllSources()); 999 content::NotificationService::AllSources());
1014 #endif 1000 #endif
1015 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 1001 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
1016 content::Source<ThemeService>( 1002 content::Source<ThemeService>(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 weak_ptr_factory_.GetWeakPtr())); 1075 weak_ptr_factory_.GetWeakPtr()));
1090 local_state_pref_change_registrar_.Init(g_browser_process->local_state()); 1076 local_state_pref_change_registrar_.Init(g_browser_process->local_state());
1091 local_state_pref_change_registrar_.Add( 1077 local_state_pref_change_registrar_.Add(
1092 prefs::kSystemTimezoneAutomaticDetectionPolicy, 1078 prefs::kSystemTimezoneAutomaticDetectionPolicy,
1093 base::Bind(&BrowserOptionsHandler:: 1079 base::Bind(&BrowserOptionsHandler::
1094 OnSystemTimezoneAutomaticDetectionPolicyChanged, 1080 OnSystemTimezoneAutomaticDetectionPolicyChanged,
1095 base::Unretained(this))); 1081 base::Unretained(this)));
1096 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile); 1082 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile);
1097 if (arc_prefs) 1083 if (arc_prefs)
1098 arc_prefs->AddObserver(this); 1084 arc_prefs->AddObserver(this);
1099 #else // !defined(OS_CHROMEOS) 1085 #else // !defined(OS_CHROMEOS)
1100 profile_pref_registrar_.Add( 1086 profile_pref_registrar_.Add(
1101 proxy_config::prefs::kProxy, 1087 proxy_config::prefs::kProxy,
1102 base::Bind(&BrowserOptionsHandler::SetupProxySettingsSection, 1088 base::Bind(&BrowserOptionsHandler::SetupProxySettingsSection,
1103 base::Unretained(this))); 1089 base::Unretained(this)));
1104 #endif // !defined(OS_CHROMEOS) 1090 #endif // !defined(OS_CHROMEOS)
1105 1091
1106 profile_pref_registrar_.Add( 1092 profile_pref_registrar_.Add(
1107 prefs::kSafeBrowsingExtendedReportingEnabled, 1093 prefs::kSafeBrowsingExtendedReportingEnabled,
1108 base::Bind(&BrowserOptionsHandler::SetupSafeBrowsingExtendedReporting, 1094 base::Bind(&BrowserOptionsHandler::SetupSafeBrowsingExtendedReporting,
1109 base::Unretained(this))); 1095 base::Unretained(this)));
(...skipping 23 matching lines...) Expand all
1133 SetupProxySettingsSection(); 1119 SetupProxySettingsSection();
1134 SetupManagingSupervisedUsers(); 1120 SetupManagingSupervisedUsers();
1135 SetupEasyUnlock(); 1121 SetupEasyUnlock();
1136 SetupExtensionControlledIndicators(); 1122 SetupExtensionControlledIndicators();
1137 SetupSafeBrowsingExtendedReporting(); 1123 SetupSafeBrowsingExtendedReporting();
1138 1124
1139 #if defined(OS_CHROMEOS) 1125 #if defined(OS_CHROMEOS)
1140 SetupAccessibilityFeatures(); 1126 SetupAccessibilityFeatures();
1141 policy::BrowserPolicyConnectorChromeOS* connector = 1127 policy::BrowserPolicyConnectorChromeOS* connector =
1142 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 1128 g_browser_process->platform_part()->browser_policy_connector_chromeos();
1143 enable_factory_reset_ = !connector->IsEnterpriseManaged() && 1129 enable_factory_reset_ =
1130 !connector->IsEnterpriseManaged() &&
1144 !user_manager::UserManager::Get()->IsLoggedInAsGuest() && 1131 !user_manager::UserManager::Get()->IsLoggedInAsGuest() &&
1145 !user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser(); 1132 !user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser();
1146 if (enable_factory_reset_) { 1133 if (enable_factory_reset_) {
1147 web_ui()->CallJavascriptFunctionUnsafe( 1134 web_ui()->CallJavascriptFunctionUnsafe(
1148 "BrowserOptions.enableFactoryResetSection"); 1135 "BrowserOptions.enableFactoryResetSection");
1149 } 1136 }
1150 1137
1151 Profile* const profile = Profile::FromWebUI(web_ui()); 1138 Profile* const profile = Profile::FromWebUI(web_ui());
1152 user_manager::User const* const user = 1139 user_manager::User const* const user =
1153 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 1140 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
1154 1141
1155 OnAccountPictureManagedChanged( 1142 OnAccountPictureManagedChanged(
1156 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile) 1143 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile)
1157 ->policy_service() 1144 ->policy_service()
1158 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, 1145 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME,
1159 std::string())) 1146 std::string()))
1160 .Get(policy::key::kUserAvatarImage)); 1147 .Get(policy::key::kUserAvatarImage));
1161 1148
1162 OnWallpaperManagedChanged( 1149 OnWallpaperManagedChanged(
1163 chromeos::WallpaperManager::Get()->IsPolicyControlled( 1150 chromeos::WallpaperManager::Get()->IsPolicyControlled(
1164 user->GetAccountId())); 1151 user->GetAccountId()));
1165 1152
1166 if (arc::ArcSessionManager::IsAllowedForProfile(profile) && 1153 if (arc::ArcSessionManager::IsAllowedForProfile(profile) &&
1167 !arc::ArcSessionManager::IsOptInVerificationDisabled()) { 1154 !arc::ArcSessionManager::IsOptInVerificationDisabled()) {
1168 base::FundamentalValue is_arc_enabled( 1155 base::FundamentalValue is_arc_enabled(
1169 arc::ArcSessionManager::Get()->IsArcEnabled()); 1156 arc::ArcSessionManager::Get()->IsArcEnabled());
1170 web_ui()->CallJavascriptFunctionUnsafe( 1157 web_ui()->CallJavascriptFunctionUnsafe(
1171 "BrowserOptions.showAndroidAppsSection", 1158 "BrowserOptions.showAndroidAppsSection", is_arc_enabled);
1172 is_arc_enabled);
1173 // Get the initial state of Android Settings app readiness. 1159 // Get the initial state of Android Settings app readiness.
1174 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = 1160 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
1175 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); 1161 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId);
1176 if (app_info && app_info->ready) 1162 if (app_info && app_info->ready)
1177 UpdateAndroidSettingsAppState(app_info->ready); 1163 UpdateAndroidSettingsAppState(app_info->ready);
1178 } 1164 }
1179 1165
1180 OnSystemTimezoneAutomaticDetectionPolicyChanged(); 1166 OnSystemTimezoneAutomaticDetectionPolicyChanged();
1181 #endif 1167 #endif
1182 } 1168 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN; 1238 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN;
1253 } else { 1239 } else {
1254 NOTREACHED(); 1240 NOTREACHED();
1255 return; 1241 return;
1256 } 1242 }
1257 1243
1258 SetDefaultBrowserUIString(status_string_id); 1244 SetDefaultBrowserUIString(status_string_id);
1259 } 1245 }
1260 1246
1261 void BrowserOptionsHandler::SetDefaultBrowserUIString(int status_string_id) { 1247 void BrowserOptionsHandler::SetDefaultBrowserUIString(int status_string_id) {
1262 base::StringValue status_string( 1248 base::StringValue status_string(l10n_util::GetStringFUTF16(
1263 l10n_util::GetStringFUTF16(status_string_id, 1249 status_string_id, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1264 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1265 1250
1266 base::FundamentalValue is_default( 1251 base::FundamentalValue is_default(status_string_id ==
1267 status_string_id == IDS_OPTIONS_DEFAULTBROWSER_DEFAULT); 1252 IDS_OPTIONS_DEFAULTBROWSER_DEFAULT);
1268 1253
1269 base::FundamentalValue can_be_default( 1254 base::FundamentalValue can_be_default(
1270 !IsDisabledByPolicy(default_browser_policy_) && 1255 !IsDisabledByPolicy(default_browser_policy_) &&
1271 (status_string_id == IDS_OPTIONS_DEFAULTBROWSER_DEFAULT || 1256 (status_string_id == IDS_OPTIONS_DEFAULTBROWSER_DEFAULT ||
1272 status_string_id == IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT)); 1257 status_string_id == IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT));
1273 1258
1274 web_ui()->CallJavascriptFunctionUnsafe( 1259 web_ui()->CallJavascriptFunctionUnsafe(
1275 "BrowserOptions.updateDefaultBrowserState", status_string, is_default, 1260 "BrowserOptions.updateDefaultBrowserState", status_string, is_default,
1276 can_be_default); 1261 can_be_default);
1277 } 1262 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 SendProfilesInfo(); 1384 SendProfilesInfo();
1400 } 1385 }
1401 1386
1402 void BrowserOptionsHandler::OnProfileAvatarChanged( 1387 void BrowserOptionsHandler::OnProfileAvatarChanged(
1403 const base::FilePath& profile_path) { 1388 const base::FilePath& profile_path) {
1404 SendProfilesInfo(); 1389 SendProfilesInfo();
1405 } 1390 }
1406 1391
1407 std::unique_ptr<base::ListValue> BrowserOptionsHandler::GetProfilesInfoList() { 1392 std::unique_ptr<base::ListValue> BrowserOptionsHandler::GetProfilesInfoList() {
1408 std::vector<ProfileAttributesEntry*> entries = 1393 std::vector<ProfileAttributesEntry*> entries =
1409 g_browser_process->profile_manager()-> 1394 g_browser_process->profile_manager()
1410 GetProfileAttributesStorage().GetAllProfilesAttributesSortedByName(); 1395 ->GetProfileAttributesStorage()
1396 .GetAllProfilesAttributesSortedByName();
1411 std::unique_ptr<base::ListValue> profile_info_list(new base::ListValue); 1397 std::unique_ptr<base::ListValue> profile_info_list(new base::ListValue);
1412 base::FilePath current_profile_path = 1398 base::FilePath current_profile_path =
1413 web_ui()->GetWebContents()->GetBrowserContext()->GetPath(); 1399 web_ui()->GetWebContents()->GetBrowserContext()->GetPath();
1414 1400
1415 for (const ProfileAttributesEntry* entry : entries) { 1401 for (const ProfileAttributesEntry* entry : entries) {
1416 // The items in |profile_value| are also described in 1402 // The items in |profile_value| are also described in
1417 // chrome/browser/resources/options/browser_options.js in a @typedef for 1403 // chrome/browser/resources/options/browser_options.js in a @typedef for
1418 // Profile. Please update it whenever you add or remove any keys here. 1404 // Profile. Please update it whenever you add or remove any keys here.
1419 std::unique_ptr<base::DictionaryValue> profile_value( 1405 std::unique_ptr<base::DictionaryValue> profile_value(
1420 new base::DictionaryValue()); 1406 new base::DictionaryValue());
1421 profile_value->SetString("name", entry->GetName()); 1407 profile_value->SetString("name", entry->GetName());
1422 base::FilePath profile_path = entry->GetPath(); 1408 base::FilePath profile_path = entry->GetPath();
1423 profile_value->Set("filePath", base::CreateFilePathValue(profile_path)); 1409 profile_value->Set("filePath", base::CreateFilePathValue(profile_path));
1424 profile_value->SetBoolean("isCurrentProfile", 1410 profile_value->SetBoolean("isCurrentProfile",
1425 profile_path == current_profile_path); 1411 profile_path == current_profile_path);
1426 profile_value->SetBoolean("isSupervised", entry->IsSupervised()); 1412 profile_value->SetBoolean("isSupervised", entry->IsSupervised());
1427 profile_value->SetBoolean("isChild", entry->IsChild()); 1413 profile_value->SetBoolean("isChild", entry->IsChild());
1428 1414
1429 if (entry->IsUsingGAIAPicture() && entry->GetGAIAPicture()) { 1415 if (entry->IsUsingGAIAPicture() && entry->GetGAIAPicture()) {
1430 gfx::Image icon = profiles::GetAvatarIconForWebUI(entry->GetAvatarIcon(), 1416 gfx::Image icon =
1431 true); 1417 profiles::GetAvatarIconForWebUI(entry->GetAvatarIcon(), true);
1432 profile_value->SetString("iconURL", 1418 profile_value->SetString("iconURL",
1433 webui::GetBitmapDataUrl(icon.AsBitmap())); 1419 webui::GetBitmapDataUrl(icon.AsBitmap()));
1434 } else { 1420 } else {
1435 size_t icon_index = entry->GetAvatarIconIndex(); 1421 size_t icon_index = entry->GetAvatarIconIndex();
1436 profile_value->SetString("iconURL", 1422 profile_value->SetString("iconURL",
1437 profiles::GetDefaultAvatarIconUrl(icon_index)); 1423 profiles::GetDefaultAvatarIconUrl(icon_index));
1438 } 1424 }
1439 1425
1440 profile_info_list->Append(std::move(profile_value)); 1426 profile_info_list->Append(std::move(profile_value));
1441 } 1427 }
(...skipping 15 matching lines...) Expand all
1457 NOTREACHED(); 1443 NOTREACHED();
1458 return; 1444 return;
1459 } 1445 }
1460 1446
1461 base::FilePath file_path; 1447 base::FilePath file_path;
1462 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { 1448 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) {
1463 NOTREACHED(); 1449 NOTREACHED();
1464 return; 1450 return;
1465 } 1451 }
1466 1452
1467 webui::DeleteProfileAtPath(file_path, 1453 webui::DeleteProfileAtPath(file_path, web_ui(),
1468 web_ui(),
1469 ProfileMetrics::DELETE_PROFILE_SETTINGS); 1454 ProfileMetrics::DELETE_PROFILE_SETTINGS);
1470 } 1455 }
1471 1456
1472 void BrowserOptionsHandler::ObserveThemeChanged() { 1457 void BrowserOptionsHandler::ObserveThemeChanged() {
1473 Profile* profile = Profile::FromWebUI(web_ui()); 1458 Profile* profile = Profile::FromWebUI(web_ui());
1474 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); 1459 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
1475 bool is_system_theme = false; 1460 bool is_system_theme = false;
1476 1461
1477 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 1462 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1478 bool profile_is_supervised = profile->IsSupervised(); 1463 bool profile_is_supervised = profile->IsSupervised();
1479 is_system_theme = theme_service->UsingSystemTheme(); 1464 is_system_theme = theme_service->UsingSystemTheme();
1480 base::FundamentalValue native_theme_enabled(!is_system_theme && 1465 base::FundamentalValue native_theme_enabled(!is_system_theme &&
1481 !profile_is_supervised); 1466 !profile_is_supervised);
1482 web_ui()->CallJavascriptFunctionUnsafe( 1467 web_ui()->CallJavascriptFunctionUnsafe(
1483 "BrowserOptions.setNativeThemeButtonEnabled", native_theme_enabled); 1468 "BrowserOptions.setNativeThemeButtonEnabled", native_theme_enabled);
1484 #endif 1469 #endif
1485 1470
1486 bool is_classic_theme = !is_system_theme && 1471 bool is_classic_theme =
1487 theme_service->UsingDefaultTheme(); 1472 !is_system_theme && theme_service->UsingDefaultTheme();
1488 base::FundamentalValue enabled(!is_classic_theme); 1473 base::FundamentalValue enabled(!is_classic_theme);
1489 web_ui()->CallJavascriptFunctionUnsafe( 1474 web_ui()->CallJavascriptFunctionUnsafe(
1490 "BrowserOptions.setThemesResetButtonEnabled", enabled); 1475 "BrowserOptions.setThemesResetButtonEnabled", enabled);
1491 } 1476 }
1492 1477
1493 void BrowserOptionsHandler::ThemesReset(const base::ListValue* args) { 1478 void BrowserOptionsHandler::ThemesReset(const base::ListValue* args) {
1494 Profile* profile = Profile::FromWebUI(web_ui()); 1479 Profile* profile = Profile::FromWebUI(web_ui());
1495 content::RecordAction(UserMetricsAction("Options_ThemesReset")); 1480 content::RecordAction(UserMetricsAction("Options_ThemesReset"));
1496 ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme(); 1481 ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme();
1497 } 1482 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 1566
1582 browser_sync::ProfileSyncService* service = 1567 browser_sync::ProfileSyncService* service =
1583 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); 1568 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
1584 SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile); 1569 SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
1585 DCHECK(signin); 1570 DCHECK(signin);
1586 sync_status->SetBoolean("signoutAllowed", !signout_prohibited); 1571 sync_status->SetBoolean("signoutAllowed", !signout_prohibited);
1587 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); 1572 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed());
1588 sync_status->SetBoolean("syncSystemEnabled", (service != NULL)); 1573 sync_status->SetBoolean("syncSystemEnabled", (service != NULL));
1589 sync_status->SetBoolean("setupCompleted", 1574 sync_status->SetBoolean("setupCompleted",
1590 service && service->IsFirstSetupComplete()); 1575 service && service->IsFirstSetupComplete());
1591 sync_status->SetBoolean("setupInProgress", 1576 sync_status->SetBoolean(
1577 "setupInProgress",
1592 service && !service->IsManaged() && service->IsFirstSetupInProgress()); 1578 service && !service->IsManaged() && service->IsFirstSetupInProgress());
1593 1579
1594 base::string16 status_label; 1580 base::string16 status_label;
1595 base::string16 link_label; 1581 base::string16 link_label;
1596 sync_ui_util::ActionType action_type = sync_ui_util::NO_ACTION; 1582 sync_ui_util::ActionType action_type = sync_ui_util::NO_ACTION;
1597 bool status_has_error = 1583 bool status_has_error =
1598 sync_ui_util::GetStatusLabels(profile, service, *signin, 1584 sync_ui_util::GetStatusLabels(
1599 sync_ui_util::WITH_HTML, &status_label, 1585 profile, service, *signin, sync_ui_util::WITH_HTML, &status_label,
1600 &link_label, &action_type) == 1586 &link_label, &action_type) == sync_ui_util::SYNC_ERROR;
1601 sync_ui_util::SYNC_ERROR;
1602 sync_status->SetString("statusText", status_label); 1587 sync_status->SetString("statusText", status_label);
1603 sync_status->SetString("actionLinkText", link_label); 1588 sync_status->SetString("actionLinkText", link_label);
1604 sync_status->SetBoolean("hasError", status_has_error); 1589 sync_status->SetBoolean("hasError", status_has_error);
1605 sync_status->SetString("statusAction", GetSyncErrorAction(action_type)); 1590 sync_status->SetString("statusAction", GetSyncErrorAction(action_type));
1606 sync_status->SetBoolean("managed", service && service->IsManaged()); 1591 sync_status->SetBoolean("managed", service && service->IsManaged());
1607 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); 1592 sync_status->SetBoolean("signedIn", signin->IsAuthenticated());
1608 sync_status->SetString("accountInfo", 1593 sync_status->SetString("accountInfo",
1609 l10n_util::GetStringFUTF16( 1594 l10n_util::GetStringFUTF16(
1610 IDS_SYNC_ACCOUNT_INFO, 1595 IDS_SYNC_ACCOUNT_INFO,
1611 signin_ui_util::GetAuthenticatedUsername(signin))); 1596 signin_ui_util::GetAuthenticatedUsername(signin)));
1612 sync_status->SetBoolean("hasUnrecoverableError", 1597 sync_status->SetBoolean("hasUnrecoverableError",
1613 service && service->HasUnrecoverableError()); 1598 service && service->HasUnrecoverableError());
1614 1599
1615 return sync_status; 1600 return sync_status;
1616 } 1601 }
1617 1602
1618 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1603 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1619 const base::ListValue* args) { 1604 const base::ListValue* args) {
1620 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1605 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1621 select_folder_dialog_ = ui::SelectFileDialog::Create( 1606 select_folder_dialog_ = ui::SelectFileDialog::Create(
1622 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1607 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1623 ui::SelectFileDialog::FileTypeInfo info; 1608 ui::SelectFileDialog::FileTypeInfo info;
1624 info.allowed_paths = ui::SelectFileDialog::FileTypeInfo::NATIVE_OR_DRIVE_PATH; 1609 info.allowed_paths = ui::SelectFileDialog::FileTypeInfo::NATIVE_OR_DRIVE_PATH;
1625 select_folder_dialog_->SelectFile( 1610 select_folder_dialog_->SelectFile(
1626 ui::SelectFileDialog::SELECT_FOLDER, 1611 ui::SelectFileDialog::SELECT_FOLDER,
1627 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE), 1612 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
1628 pref_service->GetFilePath(prefs::kDownloadDefaultDirectory), 1613 pref_service->GetFilePath(prefs::kDownloadDefaultDirectory), &info, 0,
1629 &info,
1630 0,
1631 base::FilePath::StringType(), 1614 base::FilePath::StringType(),
1632 web_ui()->GetWebContents()->GetTopLevelNativeWindow(), 1615 web_ui()->GetWebContents()->GetTopLevelNativeWindow(), NULL);
1633 NULL);
1634 } 1616 }
1635 1617
1636 void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index, 1618 void BrowserOptionsHandler::FileSelected(const base::FilePath& path,
1619 int index,
1637 void* params) { 1620 void* params) {
1638 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); 1621 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory"));
1639 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1622 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1640 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); 1623 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path);
1641 pref_service->SetFilePath(prefs::kSaveFileDefaultDirectory, path); 1624 pref_service->SetFilePath(prefs::kSaveFileDefaultDirectory, path);
1642 } 1625 }
1643 1626
1644 #if defined(OS_CHROMEOS) 1627 #if defined(OS_CHROMEOS)
1645 void BrowserOptionsHandler::TouchpadExists(bool exists) { 1628 void BrowserOptionsHandler::TouchpadExists(bool exists) {
1646 base::FundamentalValue val(exists); 1629 base::FundamentalValue val(exists);
(...skipping 18 matching lines...) Expand all
1665 1648
1666 void BrowserOptionsHandler::OnWallpaperPolicyChanged( 1649 void BrowserOptionsHandler::OnWallpaperPolicyChanged(
1667 const base::Value* previous_policy, 1650 const base::Value* previous_policy,
1668 const base::Value* current_policy) { 1651 const base::Value* current_policy) {
1669 const bool had_policy = previous_policy; 1652 const bool had_policy = previous_policy;
1670 const bool has_policy = current_policy; 1653 const bool has_policy = current_policy;
1671 if (had_policy != has_policy) 1654 if (had_policy != has_policy)
1672 OnWallpaperManagedChanged(has_policy); 1655 OnWallpaperManagedChanged(has_policy);
1673 } 1656 }
1674 1657
1675 void BrowserOptionsHandler::OnPowerwashDialogShow( 1658 void BrowserOptionsHandler::OnPowerwashDialogShow(const base::ListValue* args) {
1676 const base::ListValue* args) { 1659 UMA_HISTOGRAM_ENUMERATION("Reset.ChromeOS.PowerwashDialogShown",
1677 UMA_HISTOGRAM_ENUMERATION( 1660 chromeos::reset::DIALOG_FROM_OPTIONS,
1678 "Reset.ChromeOS.PowerwashDialogShown", 1661 chromeos::reset::DIALOG_VIEW_TYPE_SIZE);
1679 chromeos::reset::DIALOG_FROM_OPTIONS,
1680 chromeos::reset::DIALOG_VIEW_TYPE_SIZE);
1681 } 1662 }
1682 1663
1683 #endif // defined(OS_CHROMEOS) 1664 #endif // defined(OS_CHROMEOS)
1684 1665
1685 void BrowserOptionsHandler::UpdateSyncState() { 1666 void BrowserOptionsHandler::UpdateSyncState() {
1686 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.updateSyncState", 1667 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.updateSyncState",
1687 *GetSyncStateDictionary()); 1668 *GetSyncStateDictionary());
1688 1669
1689 // A change in sign-in state also affects how hotwording and audio history are 1670 // A change in sign-in state also affects how hotwording and audio history are
1690 // displayed. Hide all hotwording and re-display properly. 1671 // displayed. Hide all hotwording and re-display properly.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 // Navigate in current tab to devices page. 1753 // Navigate in current tab to devices page.
1773 OpenURLParams params(GURL(chrome::kChromeUIDevicesURL), Referrer(), 1754 OpenURLParams params(GURL(chrome::kChromeUIDevicesURL), Referrer(),
1774 WindowOpenDisposition::CURRENT_TAB, 1755 WindowOpenDisposition::CURRENT_TAB,
1775 ui::PAGE_TRANSITION_LINK, false); 1756 ui::PAGE_TRANSITION_LINK, false);
1776 web_ui()->GetWebContents()->OpenURL(params); 1757 web_ui()->GetWebContents()->OpenURL(params);
1777 } 1758 }
1778 #endif 1759 #endif
1779 1760
1780 void BrowserOptionsHandler::SetHotwordAudioHistorySectionVisible( 1761 void BrowserOptionsHandler::SetHotwordAudioHistorySectionVisible(
1781 const base::string16& audio_history_state, 1762 const base::string16& audio_history_state,
1782 bool success, bool logging_enabled) { 1763 bool success,
1764 bool logging_enabled) {
1783 bool visible = logging_enabled && success; 1765 bool visible = logging_enabled && success;
1784 web_ui()->CallJavascriptFunctionUnsafe( 1766 web_ui()->CallJavascriptFunctionUnsafe(
1785 "BrowserOptions.setAudioHistorySectionVisible", 1767 "BrowserOptions.setAudioHistorySectionVisible",
1786 base::FundamentalValue(visible), base::StringValue(audio_history_state)); 1768 base::FundamentalValue(visible), base::StringValue(audio_history_state));
1787 } 1769 }
1788 1770
1789 void BrowserOptionsHandler::HandleRequestGoogleNowAvailable( 1771 void BrowserOptionsHandler::HandleRequestGoogleNowAvailable(
1790 const base::ListValue* args) { 1772 const base::ListValue* args) {
1791 bool is_search_provider_google = false; 1773 bool is_search_provider_google = false;
1792 if (template_url_service_ && template_url_service_->loaded()) { 1774 if (template_url_service_ && template_url_service_->loaded()) {
1793 const TemplateURL* default_url = 1775 const TemplateURL* default_url =
1794 template_url_service_->GetDefaultSearchProvider(); 1776 template_url_service_->GetDefaultSearchProvider();
1795 if (default_url && default_url->HasGoogleBaseURLs( 1777 if (default_url &&
1778 default_url->HasGoogleBaseURLs(
1796 template_url_service_->search_terms_data())) { 1779 template_url_service_->search_terms_data())) {
1797 is_search_provider_google = true; 1780 is_search_provider_google = true;
1798 } 1781 }
1799 } 1782 }
1800 1783
1801 std::string group = base::FieldTrialList::FindFullName("GoogleNowExtension"); 1784 std::string group = base::FieldTrialList::FindFullName("GoogleNowExtension");
1802 bool has_field_trial = !group.empty() && group != "Disabled"; 1785 bool has_field_trial = !group.empty() && group != "Disabled";
1803 1786
1804 bool should_show = is_search_provider_google && has_field_trial; 1787 bool should_show = is_search_provider_google && has_field_trial;
1805 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setNowSectionVisible", 1788 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setNowSectionVisible",
1806 base::FundamentalValue(should_show)); 1789 base::FundamentalValue(should_show));
1807 } 1790 }
1808 1791
1809 void BrowserOptionsHandler::HandleRequestHotwordAvailable( 1792 void BrowserOptionsHandler::HandleRequestHotwordAvailable(
1810 const base::ListValue* args) { 1793 const base::ListValue* args) {
1811 Profile* profile = Profile::FromWebUI(web_ui()); 1794 Profile* profile = Profile::FromWebUI(web_ui());
1812 1795
1813 bool is_search_provider_google = false; 1796 bool is_search_provider_google = false;
1814 // The check for default search provider is only valid if the 1797 // The check for default search provider is only valid if the
1815 // |template_url_service_| has loaded already. 1798 // |template_url_service_| has loaded already.
1816 if (template_url_service_ && template_url_service_->loaded()) { 1799 if (template_url_service_ && template_url_service_->loaded()) {
1817 const TemplateURL* default_url = 1800 const TemplateURL* default_url =
1818 template_url_service_->GetDefaultSearchProvider(); 1801 template_url_service_->GetDefaultSearchProvider();
1819 if (default_url && default_url->HasGoogleBaseURLs( 1802 if (default_url &&
1803 default_url->HasGoogleBaseURLs(
1820 template_url_service_->search_terms_data())) { 1804 template_url_service_->search_terms_data())) {
1821 is_search_provider_google = true; 1805 is_search_provider_google = true;
1822 } else { 1806 } else {
1823 // If the user has chosen a default search provide other than Google, turn 1807 // If the user has chosen a default search provide other than Google, turn
1824 // off hotwording since other providers don't provide that functionality. 1808 // off hotwording since other providers don't provide that functionality.
1825 HotwordService* hotword_service = 1809 HotwordService* hotword_service =
1826 HotwordServiceFactory::GetForProfile(profile); 1810 HotwordServiceFactory::GetForProfile(profile);
1827 if (hotword_service) 1811 if (hotword_service)
1828 hotword_service->DisableHotwordPreferences(); 1812 hotword_service->DisableHotwordPreferences();
1829 } 1813 }
1830 } 1814 }
1831 1815
1832 // |is_search_provider_google| may be false because |template_url_service_| 1816 // |is_search_provider_google| may be false because |template_url_service_|
1833 // does not exist yet or because the user selected a different search 1817 // does not exist yet or because the user selected a different search
1834 // provider. In either case it does not make sense to show the hotwording 1818 // provider. In either case it does not make sense to show the hotwording
1835 // options. 1819 // options.
1836 if (!is_search_provider_google) { 1820 if (!is_search_provider_google) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 // Audio history should be displayed if it's enabled regardless of the 1852 // Audio history should be displayed if it's enabled regardless of the
1869 // hotword error state if the user is signed in. If the user is not signed 1853 // hotword error state if the user is signed in. If the user is not signed
1870 // in, audio history is meaningless. This is only displayed if always-on 1854 // in, audio history is meaningless. This is only displayed if always-on
1871 // hotwording is available. 1855 // hotwording is available.
1872 if (authenticated && always_on) { 1856 if (authenticated && always_on) {
1873 std::string user_display_name = 1857 std::string user_display_name =
1874 signin->GetAuthenticatedAccountInfo().email; 1858 signin->GetAuthenticatedAccountInfo().email;
1875 DCHECK(!user_display_name.empty()); 1859 DCHECK(!user_display_name.empty());
1876 base::string16 audio_history_state = 1860 base::string16 audio_history_state =
1877 l10n_util::GetStringFUTF16(IDS_HOTWORD_AUDIO_HISTORY_ENABLED, 1861 l10n_util::GetStringFUTF16(IDS_HOTWORD_AUDIO_HISTORY_ENABLED,
1878 base::ASCIIToUTF16(user_display_name)); 1862 base::ASCIIToUTF16(user_display_name));
1879 HotwordService* hotword_service = 1863 HotwordService* hotword_service =
1880 HotwordServiceFactory::GetForProfile(profile); 1864 HotwordServiceFactory::GetForProfile(profile);
1881 if (hotword_service) { 1865 if (hotword_service) {
1882 hotword_service->GetAudioHistoryHandler()->GetAudioHistoryEnabled( 1866 hotword_service->GetAudioHistoryHandler()->GetAudioHistoryEnabled(
1883 base::Bind( 1867 base::Bind(
1884 &BrowserOptionsHandler::SetHotwordAudioHistorySectionVisible, 1868 &BrowserOptionsHandler::SetHotwordAudioHistorySectionVisible,
1885 weak_ptr_factory_.GetWeakPtr(), 1869 weak_ptr_factory_.GetWeakPtr(), audio_history_state));
1886 audio_history_state));
1887 } 1870 }
1888 } 1871 }
1889 1872
1890 if (!error) { 1873 if (!error) {
1891 web_ui()->CallJavascriptFunctionUnsafe(function_name); 1874 web_ui()->CallJavascriptFunctionUnsafe(function_name);
1892 } else { 1875 } else {
1893 base::string16 hotword_help_url = 1876 base::string16 hotword_help_url =
1894 base::ASCIIToUTF16(chrome::kHotwordLearnMoreURL); 1877 base::ASCIIToUTF16(chrome::kHotwordLearnMoreURL);
1895 base::StringValue error_message(l10n_util::GetStringUTF16(error)); 1878 base::StringValue error_message(l10n_util::GetStringUTF16(error));
1896 if (error == IDS_HOTWORD_GENERIC_ERROR_MESSAGE) { 1879 if (error == IDS_HOTWORD_GENERIC_ERROR_MESSAGE) {
1897 error_message = base::StringValue( 1880 error_message = base::StringValue(
1898 l10n_util::GetStringFUTF16(error, hotword_help_url)); 1881 l10n_util::GetStringFUTF16(error, hotword_help_url));
1899 } 1882 }
1900 web_ui()->CallJavascriptFunctionUnsafe(function_name, error_message); 1883 web_ui()->CallJavascriptFunctionUnsafe(function_name, error_message);
1901 } 1884 }
1902 } 1885 }
1903 } 1886 }
1904 1887
1905 void BrowserOptionsHandler::HandleLaunchHotwordAudioVerificationApp( 1888 void BrowserOptionsHandler::HandleLaunchHotwordAudioVerificationApp(
1906 const base::ListValue* args) { 1889 const base::ListValue* args) {
1907 Profile* profile = Profile::FromWebUI(web_ui()); 1890 Profile* profile = Profile::FromWebUI(web_ui());
1908 1891
1909 bool retrain = false; 1892 bool retrain = false;
1910 bool success = args->GetBoolean(0, &retrain); 1893 bool success = args->GetBoolean(0, &retrain);
1911 DCHECK(success); 1894 DCHECK(success);
1912 HotwordService::LaunchMode launch_mode = 1895 HotwordService::LaunchMode launch_mode =
1913 HotwordService::HOTWORD_AND_AUDIO_HISTORY; 1896 HotwordService::HOTWORD_AND_AUDIO_HISTORY;
1914 1897
1915 if (retrain) { 1898 if (retrain) {
1916 DCHECK(profile->GetPrefs()->GetBoolean( 1899 DCHECK(
1917 prefs::kHotwordAlwaysOnSearchEnabled)); 1900 profile->GetPrefs()->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled));
1918 DCHECK(profile->GetPrefs()->GetBoolean( 1901 DCHECK(profile->GetPrefs()->GetBoolean(prefs::kHotwordAudioLoggingEnabled));
1919 prefs::kHotwordAudioLoggingEnabled));
1920 1902
1921 launch_mode = HotwordService::RETRAIN; 1903 launch_mode = HotwordService::RETRAIN;
1922 } else if (profile->GetPrefs()->GetBoolean( 1904 } else if (profile->GetPrefs()->GetBoolean(
1923 prefs::kHotwordAudioLoggingEnabled)) { 1905 prefs::kHotwordAudioLoggingEnabled)) {
1924 DCHECK(!profile->GetPrefs()->GetBoolean( 1906 DCHECK(
1925 prefs::kHotwordAlwaysOnSearchEnabled)); 1907 !profile->GetPrefs()->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled));
1926 launch_mode = HotwordService::HOTWORD_ONLY; 1908 launch_mode = HotwordService::HOTWORD_ONLY;
1927 } else { 1909 } else {
1928 DCHECK(!profile->GetPrefs()->GetBoolean( 1910 DCHECK(
1929 prefs::kHotwordAlwaysOnSearchEnabled)); 1911 !profile->GetPrefs()->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled));
1930 } 1912 }
1931 1913
1932 HotwordService* hotword_service = 1914 HotwordService* hotword_service =
1933 HotwordServiceFactory::GetForProfile(profile); 1915 HotwordServiceFactory::GetForProfile(profile);
1934 if (!hotword_service) 1916 if (!hotword_service)
1935 return; 1917 return;
1936 1918
1937 hotword_service->OptIntoHotwording(launch_mode); 1919 hotword_service->OptIntoHotwording(launch_mode);
1938 } 1920 }
1939 1921
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 void BrowserOptionsHandler::OnAppRegistered( 1960 void BrowserOptionsHandler::OnAppRegistered(
1979 const std::string& app_id, 1961 const std::string& app_id,
1980 const ArcAppListPrefs::AppInfo& app_info) { 1962 const ArcAppListPrefs::AppInfo& app_info) {
1981 OnAppReadyChanged(app_id, app_info.ready); 1963 OnAppReadyChanged(app_id, app_info.ready);
1982 } 1964 }
1983 1965
1984 void BrowserOptionsHandler::OnAppRemoved(const std::string& app_id) { 1966 void BrowserOptionsHandler::OnAppRemoved(const std::string& app_id) {
1985 OnAppReadyChanged(app_id, false); 1967 OnAppReadyChanged(app_id, false);
1986 } 1968 }
1987 1969
1988 void BrowserOptionsHandler::OnAppReadyChanged( 1970 void BrowserOptionsHandler::OnAppReadyChanged(const std::string& app_id,
1989 const std::string& app_id, 1971 bool ready) {
1990 bool ready) {
1991 if (app_id == arc::kSettingsAppId) { 1972 if (app_id == arc::kSettingsAppId) {
1992 UpdateAndroidSettingsAppState(ready); 1973 UpdateAndroidSettingsAppState(ready);
1993 } 1974 }
1994 } 1975 }
1995 1976
1996 void BrowserOptionsHandler::UpdateAndroidSettingsAppState(bool visible) { 1977 void BrowserOptionsHandler::UpdateAndroidSettingsAppState(bool visible) {
1997 base::FundamentalValue is_visible(visible); 1978 base::FundamentalValue is_visible(visible);
1998 web_ui()->CallJavascriptFunctionUnsafe( 1979 web_ui()->CallJavascriptFunctionUnsafe(
1999 "BrowserOptions.setAndroidAppsSettingsVisibility", is_visible); 1980 "BrowserOptions.setAndroidAppsSettingsVisibility", is_visible);
2000 } 1981 }
2001 1982
2002 void BrowserOptionsHandler::ShowAndroidAppsSettings( 1983 void BrowserOptionsHandler::ShowAndroidAppsSettings(
2003 const base::ListValue* args) { 1984 const base::ListValue* args) {
2004 Profile* profile = Profile::FromWebUI(web_ui()); 1985 Profile* profile = Profile::FromWebUI(web_ui());
2005 // Settings in secondary profile cannot access ARC. 1986 // Settings in secondary profile cannot access ARC.
2006 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { 1987 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) {
2007 LOG(ERROR) << "Settings can't be invoked for non-primary profile"; 1988 LOG(ERROR) << "Settings can't be invoked for non-primary profile";
2008 return; 1989 return;
2009 } 1990 }
2010 1991
2011 arc::LaunchAndroidSettingsApp(profile); 1992 // We only care whether the event came from a keyboard or non-keyboard
1993 // (mouse/touch). Set the default flags in such a way that it would appear
1994 // that it came from a mouse by default.
1995 int flags = ui::EF_LEFT_MOUSE_BUTTON;
1996 bool is_mouse_or_touch = true;
1997 if (args->GetBoolean(0, &is_mouse_or_touch) && !is_mouse_or_touch)
1998 flags = ui::EF_NONE;
1999
2000 arc::LaunchAndroidSettingsApp(profile, flags);
2012 } 2001 }
2013 2002
2014 void BrowserOptionsHandler::ShowAccessibilityTalkBackSettings( 2003 void BrowserOptionsHandler::ShowAccessibilityTalkBackSettings(
2015 const base::ListValue *args) { 2004 const base::ListValue* args) {
2016 Profile* profile = Profile::FromWebUI(web_ui()); 2005 Profile* profile = Profile::FromWebUI(web_ui());
2017 // Settings in secondary profile cannot access ARC. 2006 // Settings in secondary profile cannot access ARC.
2018 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) { 2007 if (!arc::ArcSessionManager::IsAllowedForProfile(profile)) {
2019 LOG(WARNING) << "Settings can't be invoked for non-primary profile"; 2008 LOG(WARNING) << "Settings can't be invoked for non-primary profile";
2020 return; 2009 return;
2021 } 2010 }
2022 2011
2023 arc::ShowTalkBackSettings(); 2012 arc::ShowTalkBackSettings();
2024 } 2013 }
2025 2014
(...skipping 17 matching lines...) Expand all
2043 } 2032 }
2044 #endif 2033 #endif
2045 } 2034 }
2046 2035
2047 void BrowserOptionsHandler::SetupNetworkPredictionControl() { 2036 void BrowserOptionsHandler::SetupNetworkPredictionControl() {
2048 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 2037 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
2049 2038
2050 base::DictionaryValue dict; 2039 base::DictionaryValue dict;
2051 dict.SetInteger("value", 2040 dict.SetInteger("value",
2052 pref_service->GetInteger(prefs::kNetworkPredictionOptions)); 2041 pref_service->GetInteger(prefs::kNetworkPredictionOptions));
2053 dict.SetBoolean("disabled", 2042 dict.SetBoolean("disabled", !pref_service->IsUserModifiablePreference(
2054 !pref_service->IsUserModifiablePreference( 2043 prefs::kNetworkPredictionOptions));
2055 prefs::kNetworkPredictionOptions));
2056 2044
2057 web_ui()->CallJavascriptFunctionUnsafe( 2045 web_ui()->CallJavascriptFunctionUnsafe(
2058 "BrowserOptions.setNetworkPredictionValue", dict); 2046 "BrowserOptions.setNetworkPredictionValue", dict);
2059 } 2047 }
2060 2048
2061 void BrowserOptionsHandler::SetupFontSizeSelector() { 2049 void BrowserOptionsHandler::SetupFontSizeSelector() {
2062 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 2050 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
2063 const PrefService::Preference* default_font_size = 2051 const PrefService::Preference* default_font_size =
2064 pref_service->FindPreference(prefs::kWebKitDefaultFontSize); 2052 pref_service->FindPreference(prefs::kWebKitDefaultFontSize);
2065 const PrefService::Preference* default_fixed_font_size = 2053 const PrefService::Preference* default_fixed_font_size =
2066 pref_service->FindPreference(prefs::kWebKitDefaultFixedFontSize); 2054 pref_service->FindPreference(prefs::kWebKitDefaultFixedFontSize);
2067 2055
2068 base::DictionaryValue dict; 2056 base::DictionaryValue dict;
2069 dict.SetInteger("value", 2057 dict.SetInteger("value",
2070 pref_service->GetInteger(prefs::kWebKitDefaultFontSize)); 2058 pref_service->GetInteger(prefs::kWebKitDefaultFontSize));
2071 2059
2072 // The font size control displays the value of the default font size, but 2060 // The font size control displays the value of the default font size, but
2073 // setting it alters both the default font size and the default fixed font 2061 // setting it alters both the default font size and the default fixed font
2074 // size. So it must be disabled when either of those prefs is not user 2062 // size. So it must be disabled when either of those prefs is not user
2075 // modifiable. 2063 // modifiable.
2076 dict.SetBoolean("disabled", 2064 dict.SetBoolean("disabled", !default_font_size->IsUserModifiable() ||
2077 !default_font_size->IsUserModifiable() || 2065 !default_fixed_font_size->IsUserModifiable());
2078 !default_fixed_font_size->IsUserModifiable());
2079 2066
2080 // This is a simplified version of CoreOptionsHandler::CreateValueForPref, 2067 // This is a simplified version of CoreOptionsHandler::CreateValueForPref,
2081 // adapted to consider two prefs. It may be better to refactor 2068 // adapted to consider two prefs. It may be better to refactor
2082 // CreateValueForPref so it can be called from here. 2069 // CreateValueForPref so it can be called from here.
2083 if (default_font_size->IsManaged() || default_fixed_font_size->IsManaged()) { 2070 if (default_font_size->IsManaged() || default_fixed_font_size->IsManaged()) {
2084 dict.SetString("controlledBy", "policy"); 2071 dict.SetString("controlledBy", "policy");
2085 } else if (default_font_size->IsExtensionControlled() || 2072 } else if (default_font_size->IsExtensionControlled() ||
2086 default_fixed_font_size->IsExtensionControlled()) { 2073 default_fixed_font_size->IsExtensionControlled()) {
2087 dict.SetString("controlledBy", "extension"); 2074 dict.SetString("controlledBy", "extension");
2088 } 2075 }
2089 2076
2090 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setFontSize", dict); 2077 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setFontSize", dict);
2091 } 2078 }
2092 2079
2093 void BrowserOptionsHandler::SetupPageZoomSelector() { 2080 void BrowserOptionsHandler::SetupPageZoomSelector() {
2094 double default_zoom_level = 2081 double default_zoom_level = content::HostZoomMap::GetDefaultForBrowserContext(
2095 content::HostZoomMap::GetDefaultForBrowserContext( 2082 Profile::FromWebUI(web_ui()))
2096 Profile::FromWebUI(web_ui()))->GetDefaultZoomLevel(); 2083 ->GetDefaultZoomLevel();
2097 double default_zoom_factor = 2084 double default_zoom_factor =
2098 content::ZoomLevelToZoomFactor(default_zoom_level); 2085 content::ZoomLevelToZoomFactor(default_zoom_level);
2099 2086
2100 // Generate a vector of zoom factors from an array of known presets along with 2087 // Generate a vector of zoom factors from an array of known presets along with
2101 // the default factor added if necessary. 2088 // the default factor added if necessary.
2102 std::vector<double> zoom_factors = 2089 std::vector<double> zoom_factors =
2103 zoom::PageZoom::PresetZoomFactors(default_zoom_factor); 2090 zoom::PageZoom::PresetZoomFactors(default_zoom_factor);
2104 2091
2105 // Iterate through the zoom factors and and build the contents of the 2092 // Iterate through the zoom factors and and build the contents of the
2106 // selector that will be sent to the javascript handler. 2093 // selector that will be sent to the javascript handler.
(...skipping 16 matching lines...) Expand all
2123 2110
2124 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setupPageZoomSelector", 2111 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.setupPageZoomSelector",
2125 zoom_factors_value); 2112 zoom_factors_value);
2126 } 2113 }
2127 2114
2128 void BrowserOptionsHandler::SetupAutoOpenFileTypes() { 2115 void BrowserOptionsHandler::SetupAutoOpenFileTypes() {
2129 // Set the hidden state for the AutoOpenFileTypesResetToDefault button. 2116 // Set the hidden state for the AutoOpenFileTypesResetToDefault button.
2130 // We show the button if the user has any auto-open file types registered. 2117 // We show the button if the user has any auto-open file types registered.
2131 DownloadManager* manager = BrowserContext::GetDownloadManager( 2118 DownloadManager* manager = BrowserContext::GetDownloadManager(
2132 web_ui()->GetWebContents()->GetBrowserContext()); 2119 web_ui()->GetWebContents()->GetBrowserContext());
2133 bool display = manager && 2120 bool display =
2134 DownloadPrefs::FromDownloadManager(manager)->IsAutoOpenUsed(); 2121 manager && DownloadPrefs::FromDownloadManager(manager)->IsAutoOpenUsed();
2135 base::FundamentalValue value(display); 2122 base::FundamentalValue value(display);
2136 web_ui()->CallJavascriptFunctionUnsafe( 2123 web_ui()->CallJavascriptFunctionUnsafe(
2137 "BrowserOptions.setAutoOpenFileTypesDisplayed", value); 2124 "BrowserOptions.setAutoOpenFileTypesDisplayed", value);
2138 } 2125 }
2139 2126
2140 void BrowserOptionsHandler::SetupProxySettingsSection() { 2127 void BrowserOptionsHandler::SetupProxySettingsSection() {
2141 #if !defined(OS_CHROMEOS) 2128 #if !defined(OS_CHROMEOS)
2142 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 2129 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
2143 const PrefService::Preference* proxy_config = 2130 const PrefService::Preference* proxy_config =
2144 pref_service->FindPreference(proxy_config::prefs::kProxy); 2131 pref_service->FindPreference(proxy_config::prefs::kProxy);
2145 bool is_extension_controlled = (proxy_config && 2132 bool is_extension_controlled =
2146 proxy_config->IsExtensionControlled()); 2133 (proxy_config && proxy_config->IsExtensionControlled());
2147 2134
2148 base::FundamentalValue disabled(proxy_config && 2135 base::FundamentalValue disabled(proxy_config &&
2149 !proxy_config->IsUserModifiable()); 2136 !proxy_config->IsUserModifiable());
2150 base::FundamentalValue extension_controlled(is_extension_controlled); 2137 base::FundamentalValue extension_controlled(is_extension_controlled);
2151 web_ui()->CallJavascriptFunctionUnsafe( 2138 web_ui()->CallJavascriptFunctionUnsafe(
2152 "BrowserOptions.setupProxySettingsButton", disabled, 2139 "BrowserOptions.setupProxySettingsButton", disabled,
2153 extension_controlled); 2140 extension_controlled);
2154 2141
2155 #if defined(OS_WIN) 2142 #if defined(OS_WIN)
2156 SetupExtensionControlledIndicators(); 2143 SetupExtensionControlledIndicators();
2157 #endif // defined(OS_WIN) 2144 #endif // defined(OS_WIN)
2158 2145
2159 #endif // !defined(OS_CHROMEOS) 2146 #endif // !defined(OS_CHROMEOS)
2160 } 2147 }
2161 2148
2162 void BrowserOptionsHandler::SetupManagingSupervisedUsers() { 2149 void BrowserOptionsHandler::SetupManagingSupervisedUsers() {
2163 bool has_users = !Profile::FromWebUI(web_ui())-> 2150 bool has_users = !Profile::FromWebUI(web_ui())
2164 GetPrefs()->GetDictionary(prefs::kSupervisedUsers)->empty(); 2151 ->GetPrefs()
2152 ->GetDictionary(prefs::kSupervisedUsers)
2153 ->empty();
2165 base::FundamentalValue has_users_value(has_users); 2154 base::FundamentalValue has_users_value(has_users);
2166 web_ui()->CallJavascriptFunctionUnsafe( 2155 web_ui()->CallJavascriptFunctionUnsafe(
2167 "BrowserOptions.updateManagesSupervisedUsers", has_users_value); 2156 "BrowserOptions.updateManagesSupervisedUsers", has_users_value);
2168 } 2157 }
2169 2158
2170 void BrowserOptionsHandler::SetupEasyUnlock() { 2159 void BrowserOptionsHandler::SetupEasyUnlock() {
2171 base::FundamentalValue is_enabled( 2160 base::FundamentalValue is_enabled(
2172 EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->IsEnabled()); 2161 EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->IsEnabled());
2173 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.updateEasyUnlock", 2162 web_ui()->CallJavascriptFunctionUnsafe("BrowserOptions.updateEasyUnlock",
2174 is_enabled); 2163 is_enabled);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 2279
2291 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2280 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2292 #if defined(OS_CHROMEOS) 2281 #if defined(OS_CHROMEOS)
2293 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2282 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2294 #else 2283 #else
2295 return true; 2284 return true;
2296 #endif 2285 #endif
2297 } 2286 }
2298 2287
2299 } // namespace options 2288 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698