OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "chrome/browser/signin/easy_unlock_service.h" | 51 #include "chrome/browser/signin/easy_unlock_service.h" |
52 #include "chrome/browser/signin/signin_manager_factory.h" | 52 #include "chrome/browser/signin/signin_manager_factory.h" |
53 #include "chrome/browser/sync/profile_sync_service.h" | 53 #include "chrome/browser/sync/profile_sync_service.h" |
54 #include "chrome/browser/sync/profile_sync_service_factory.h" | 54 #include "chrome/browser/sync/profile_sync_service_factory.h" |
55 #include "chrome/browser/sync/sync_ui_util.h" | 55 #include "chrome/browser/sync/sync_ui_util.h" |
56 #include "chrome/browser/themes/theme_service.h" | 56 #include "chrome/browser/themes/theme_service.h" |
57 #include "chrome/browser/themes/theme_service_factory.h" | 57 #include "chrome/browser/themes/theme_service_factory.h" |
58 #include "chrome/browser/ui/browser_finder.h" | 58 #include "chrome/browser/ui/browser_finder.h" |
59 #include "chrome/browser/ui/chrome_select_file_policy.h" | 59 #include "chrome/browser/ui/chrome_select_file_policy.h" |
60 #include "chrome/browser/ui/host_desktop.h" | 60 #include "chrome/browser/ui/host_desktop.h" |
| 61 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" |
61 #include "chrome/browser/ui/webui/favicon_source.h" | 62 #include "chrome/browser/ui/webui/favicon_source.h" |
62 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" | 63 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" |
63 #include "chrome/common/chrome_constants.h" | 64 #include "chrome/common/chrome_constants.h" |
64 #include "chrome/common/chrome_paths.h" | 65 #include "chrome/common/chrome_paths.h" |
65 #include "chrome/common/chrome_switches.h" | 66 #include "chrome/common/chrome_switches.h" |
66 #include "chrome/common/extensions/extension_constants.h" | 67 #include "chrome/common/extensions/extension_constants.h" |
67 #include "chrome/common/pref_names.h" | 68 #include "chrome/common/pref_names.h" |
68 #include "chrome/common/url_constants.h" | 69 #include "chrome/common/url_constants.h" |
69 #include "chrome/grit/chromium_strings.h" | 70 #include "chrome/grit/chromium_strings.h" |
70 #include "chrome/grit/generated_resources.h" | 71 #include "chrome/grit/generated_resources.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS }, | 301 IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS }, |
301 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 302 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
302 IDS_SHORT_PRODUCT_NAME }, | 303 IDS_SHORT_PRODUCT_NAME }, |
303 { "linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF }, | 304 { "linkDoctorPref", IDS_OPTIONS_LINKDOCTOR_PREF }, |
304 { "manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK }, | 305 { "manageAutofillSettings", IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS_LINK }, |
305 { "manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES }, | 306 { "manageLanguages", IDS_OPTIONS_TRANSLATE_MANAGE_LANGUAGES }, |
306 { "managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK }, | 307 { "managePasswords", IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS_LINK }, |
307 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART }, | 308 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART }, |
308 { "networkPredictionEnabledDescription", | 309 { "networkPredictionEnabledDescription", |
309 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, | 310 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, |
310 { "passwordManagerEnabled", IDS_OPTIONS_PASSWORD_MANAGER_ENABLE }, | 311 { "passwordManagerEnabled", |
| 312 password_bubble_experiment::IsSmartLockBrandingEnabled( |
| 313 Profile::FromWebUI(web_ui())) ? |
| 314 IDS_OPTIONS_PASSWORD_MANAGER_SMART_LOCK_ENABLE : |
| 315 IDS_OPTIONS_PASSWORD_MANAGER_ENABLE }, |
311 { "passwordsAndAutofillGroupName", | 316 { "passwordsAndAutofillGroupName", |
312 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME }, | 317 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME }, |
313 { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, | 318 { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, |
314 { "privacyContentSettingsButton", | 319 { "privacyContentSettingsButton", |
315 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, | 320 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, |
316 { "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE }, | 321 { "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE }, |
317 { "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE }, | 322 { "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE }, |
318 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, | 323 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, |
319 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, | 324 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, |
320 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, | 325 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, |
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2172 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2168 const policy::PolicyMap& previous, | 2173 const policy::PolicyMap& previous, |
2169 const policy::PolicyMap& current) { | 2174 const policy::PolicyMap& current) { |
2170 std::set<std::string> different_keys; | 2175 std::set<std::string> different_keys; |
2171 current.GetDifferingKeys(previous, &different_keys); | 2176 current.GetDifferingKeys(previous, &different_keys); |
2172 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2177 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2173 SetupMetricsReportingCheckbox(); | 2178 SetupMetricsReportingCheckbox(); |
2174 } | 2179 } |
2175 | 2180 |
2176 } // namespace options | 2181 } // namespace options |
OLD | NEW |