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/options2/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options2/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" | 85 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" |
86 #include "chrome/browser/chromeos/login/user_manager.h" | 86 #include "chrome/browser/chromeos/login/user_manager.h" |
87 #include "chrome/browser/chromeos/options/take_photo_dialog.h" | 87 #include "chrome/browser/chromeos/options/take_photo_dialog.h" |
88 #include "chrome/browser/chromeos/settings/cros_settings.h" | 88 #include "chrome/browser/chromeos/settings/cros_settings.h" |
89 #include "chrome/browser/ui/browser_window.h" | 89 #include "chrome/browser/ui/browser_window.h" |
90 #include "chrome/browser/ui/webui/options2/chromeos/timezone_options_util.h" | 90 #include "chrome/browser/ui/webui/options2/chromeos/timezone_options_util.h" |
91 #include "ui/gfx/image/image_skia.h" | 91 #include "ui/gfx/image/image_skia.h" |
92 #endif // defined(OS_CHROMEOS) | 92 #endif // defined(OS_CHROMEOS) |
93 | 93 |
94 #if defined(OS_WIN) | 94 #if defined(OS_WIN) |
95 #include "base/win/windows_version.h" | |
95 #include "chrome/installer/util/auto_launch_util.h" | 96 #include "chrome/installer/util/auto_launch_util.h" |
96 #endif // defined(OS_WIN) | 97 #endif // defined(OS_WIN) |
97 | 98 |
98 #if defined(TOOLKIT_GTK) | 99 #if defined(TOOLKIT_GTK) |
99 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 100 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
100 #endif // defined(TOOLKIT_GTK) | 101 #endif // defined(TOOLKIT_GTK) |
101 | 102 |
102 using content::BrowserContext; | 103 using content::BrowserContext; |
103 using content::BrowserThread; | 104 using content::BrowserThread; |
104 using content::DownloadManager; | 105 using content::DownloadManager; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 { "networkPredictionEnabledDescription", | 219 { "networkPredictionEnabledDescription", |
219 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, | 220 IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION }, |
220 { "passwordsAndAutofillGroupName", | 221 { "passwordsAndAutofillGroupName", |
221 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME }, | 222 IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME }, |
222 { "passwordManagerEnabled", IDS_OPTIONS_PASSWORD_MANAGER_ENABLE }, | 223 { "passwordManagerEnabled", IDS_OPTIONS_PASSWORD_MANAGER_ENABLE }, |
223 { "passwordGenerationEnabledDescription", | 224 { "passwordGenerationEnabledDescription", |
224 IDS_OPTIONS_PASSWORD_GENERATION_ENABLED_LABEL }, | 225 IDS_OPTIONS_PASSWORD_GENERATION_ENABLED_LABEL }, |
225 { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, | 226 { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, |
226 { "privacyContentSettingsButton", | 227 { "privacyContentSettingsButton", |
227 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, | 228 IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, |
229 #if defined(OS_WIN) | |
230 { "privacyWin8Data", IDS_OPTIONS_PRIVACY_WIN8_DATA }, | |
231 #endif | |
228 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, | 232 { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, |
229 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, | 233 { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, |
230 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, | 234 { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, |
231 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, | 235 { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, |
232 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, | 236 { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, |
233 { "proxiesLabel", IDS_OPTIONS_PROXIES_LABEL }, | 237 { "proxiesLabel", IDS_OPTIONS_PROXIES_LABEL }, |
234 { "safeBrowsingEnableProtection", | 238 { "safeBrowsingEnableProtection", |
235 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, | 239 IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION }, |
236 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, | 240 { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, |
237 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, | 241 { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 #if defined(OS_CHROMEOS) | 367 #if defined(OS_CHROMEOS) |
364 values->SetString("username", | 368 values->SetString("username", |
365 chromeos::UserManager::Get()->IsUserLoggedIn() ? | 369 chromeos::UserManager::Get()->IsUserLoggedIn() ? |
366 chromeos::UserManager::Get()->GetLoggedInUser().email() : | 370 chromeos::UserManager::Get()->GetLoggedInUser().email() : |
367 std::string()); | 371 std::string()); |
368 #endif | 372 #endif |
369 | 373 |
370 // Pass along sync status early so it will be available during page init. | 374 // Pass along sync status early so it will be available during page init. |
371 values->Set("syncData", GetSyncStateDictionary().release()); | 375 values->Set("syncData", GetSyncStateDictionary().release()); |
372 | 376 |
377 #if defined(OS_WIN) | |
378 values->SetString("privacyWin8DataLearnMoreURL", | |
379 chrome::kPrivacyWin8DataLearnMoreURL); | |
380 #endif | |
373 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); | 381 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); |
374 values->SetString("sessionRestoreLearnMoreURL", | 382 values->SetString("sessionRestoreLearnMoreURL", |
375 chrome::kSessionRestoreLearnMoreURL); | 383 chrome::kSessionRestoreLearnMoreURL); |
376 | 384 |
377 values->SetString( | 385 values->SetString( |
378 "languageSectionLabel", | 386 "languageSectionLabel", |
379 l10n_util::GetStringFUTF16( | 387 l10n_util::GetStringFUTF16( |
380 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 388 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
381 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); | 389 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); |
382 | 390 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
626 } else { | 634 } else { |
627 RemoveCloudPrintConnectorSection(); | 635 RemoveCloudPrintConnectorSection(); |
628 } | 636 } |
629 #endif | 637 #endif |
630 #if defined(OS_CHROMEOS) | 638 #if defined(OS_CHROMEOS) |
631 SetupAccessibilityFeatures(); | 639 SetupAccessibilityFeatures(); |
632 #endif | 640 #endif |
633 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 641 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
634 SetupBackgroundModeSettings(); | 642 SetupBackgroundModeSettings(); |
635 #endif | 643 #endif |
644 #if defined(OS_WIN) | |
645 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | |
646 web_ui()->CallJavascriptFunction("BrowserOptions.showWin8DataPrivacy"); | |
arv (Not doing code reviews)
2012/08/15 14:33:31
This doesn't seem right to me. We don't really nee
MAD
2012/08/15 19:29:41
Done.
| |
647 #endif | |
636 } | 648 } |
637 | 649 |
638 void BrowserOptionsHandler::CheckAutoLaunch( | 650 void BrowserOptionsHandler::CheckAutoLaunch( |
639 base::WeakPtr<BrowserOptionsHandler> weak_this, | 651 base::WeakPtr<BrowserOptionsHandler> weak_this, |
640 const FilePath& profile_path) { | 652 const FilePath& profile_path) { |
641 #if defined(OS_WIN) | 653 #if defined(OS_WIN) |
642 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 654 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
643 | 655 |
644 // Auto-launch is not supported for secondary profiles yet. | 656 // Auto-launch is not supported for secondary profiles yet. |
645 if (profile_path.BaseName().value() != ASCIIToUTF16(chrome::kInitialProfile)) | 657 if (profile_path.BaseName().value() != ASCIIToUTF16(chrome::kInitialProfile)) |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1433 } | 1445 } |
1434 | 1446 |
1435 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1447 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1436 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1448 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1437 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1449 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1438 web_ui()->CallJavascriptFunction( | 1450 web_ui()->CallJavascriptFunction( |
1439 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1451 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1440 } | 1452 } |
1441 | 1453 |
1442 } // namespace options2 | 1454 } // namespace options2 |
OLD | NEW |