diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 16:17:43 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 16:17:43 +0000 |
commit | 92af935e0defb2d1998b1397d58911a8a3d69361 (patch) | |
tree | 52491b397b0fa17f2450a77fd70a56b2cba4bced /chrome | |
parent | cc397aad185110a566ab2b9282819140ca2d83ac (diff) | |
download | chromium_src-92af935e0defb2d1998b1397d58911a8a3d69361.zip chromium_src-92af935e0defb2d1998b1397d58911a8a3d69361.tar.gz chromium_src-92af935e0defb2d1998b1397d58911a8a3d69361.tar.bz2 |
Revert 54137 - Revert 53990 - - Implement proxy settings dialog for Linux/Windows.
- Omit Network and SSL sections for ChromeOS.
BUG=49038
TEST=Exercise proxy settings dialog in dom-ui options window (--enable-tabbed-options).
Review URL: http://codereview.chromium.org/2847061
TBR=csilv@chromium.org
Review URL: http://codereview.chromium.org/2884047
TBR=glider@chromium.org
Review URL: http://codereview.chromium.org/3023026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_handler.cc | 56 | ||||
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_handler.h | 22 | ||||
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_utils.h | 25 | ||||
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_utils_gtk.cc | 132 | ||||
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_utils_mac.mm | 8 | ||||
-rw-r--r-- | chrome/browser/dom_ui/advanced_options_utils_win.cc | 67 | ||||
-rw-r--r-- | chrome/browser/resources/options/advanced_options.html | 106 | ||||
-rw-r--r-- | chrome/browser/resources/options/advanced_options.js | 15 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 4 |
9 files changed, 329 insertions, 106 deletions
diff --git a/chrome/browser/dom_ui/advanced_options_handler.cc b/chrome/browser/dom_ui/advanced_options_handler.cc index 6999dea..1f776dc 100644 --- a/chrome/browser/dom_ui/advanced_options_handler.cc +++ b/chrome/browser/dom_ui/advanced_options_handler.cc @@ -4,16 +4,12 @@ #include "chrome/browser/dom_ui/advanced_options_handler.h" -#if defined(OS_WIN) -#include <cryptuiapi.h> -#pragma comment(lib, "cryptui.lib") -#endif - #include "app/l10n_util.h" #include "base/basictypes.h" #include "base/callback.h" #include "base/values.h" #include "chrome/browser/download/download_manager.h" +#include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -25,14 +21,12 @@ #include "grit/generated_resources.h" #include "grit/locale_settings.h" -#if defined(OS_WIN) -#include "net/base/ssl_config_service_win.h" +#if !defined(OS_CHROMEOS) +#include "chrome/browser/dom_ui/advanced_options_utils.h" #endif -#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) -// The URL for Linux ssl certificate configuration help. -const char* const kLinuxCertificatesConfigUrl = - "http://code.google.com/p/chromium/wiki/LinuxCertManagement"; +#if defined(OS_WIN) +#include "net/base/ssl_config_service_win.h" #endif AdvancedOptionsHandler::AdvancedOptionsHandler() { @@ -157,12 +151,14 @@ void AdvancedOptionsHandler::RegisterMessages() { dom_ui_->RegisterMessageCallback("autoOpenFileTypesAction", NewCallback(this, &AdvancedOptionsHandler::HandleAutoOpenButton)); +#if !defined(OS_CHROMEOS) dom_ui_->RegisterMessageCallback("showManageSSLCertificates", NewCallback(this, &AdvancedOptionsHandler::ShowManageSSLCertificates)); dom_ui_->RegisterMessageCallback("showNetworkProxySettings", NewCallback(this, &AdvancedOptionsHandler::ShowNetworkProxySettings)); +#endif #if defined(OS_WIN) // Setup Windows specific callbacks. @@ -249,6 +245,21 @@ void AdvancedOptionsHandler::HandleUseSSL2Checkbox(const Value* value) { } #endif +#if !defined(OS_CHROMEOS) +void AdvancedOptionsHandler::ShowNetworkProxySettings(const Value* value) { + UserMetricsRecordAction(UserMetricsAction("Options_ShowProxySettings"), NULL); + DCHECK(dom_ui_); + AdvancedOptionsUtilities::ShowNetworkProxySettings(dom_ui_->tab_contents()); +} + +void AdvancedOptionsHandler::ShowManageSSLCertificates(const Value* value) { + UserMetricsRecordAction(UserMetricsAction("Options_ManageSSLCertificates"), + NULL); + DCHECK(dom_ui_); + AdvancedOptionsUtilities::ShowManageSSLCertificates(dom_ui_->tab_contents()); +} +#endif + void AdvancedOptionsHandler::SetupDownloadLocationPath() { DCHECK(dom_ui_); StringValue value(default_download_location_.GetValue().value()); @@ -286,26 +297,3 @@ void AdvancedOptionsHandler::SetupSSLConfigSettings() { L"advancedOptionsSetUseSSL2CheckboxStatechecked", useSSLValue); } #endif - -void AdvancedOptionsHandler::ShowNetworkProxySettings(const Value* value) { -#if defined(OS_MACOSX) - AdvancedOptionsUtilities::ShowNetworkProxySettings(); -#endif -} - -void AdvancedOptionsHandler::ShowManageSSLCertificates(const Value* value) { -#if defined(OS_MACOSX) - AdvancedOptionsUtilities::ShowManageSSLCertificates(); -#elif defined(OS_WIN) - DCHECK(dom_ui_); - CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 }; - cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); - cert_mgr.hwndParent = - dom_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); - ::CryptUIDlgCertMgr(&cert_mgr); -#elif defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) - DCHECK(dom_ui_); - dom_ui_->tab_contents()->OpenURL(GURL(kLinuxCertificatesConfigUrl), GURL(), - NEW_WINDOW, PageTransition::LINK); -#endif -} diff --git a/chrome/browser/dom_ui/advanced_options_handler.h b/chrome/browser/dom_ui/advanced_options_handler.h index ae7613a..44ea774 100644 --- a/chrome/browser/dom_ui/advanced_options_handler.h +++ b/chrome/browser/dom_ui/advanced_options_handler.h @@ -10,10 +10,6 @@ #include "chrome/browser/pref_member.h" #include "chrome/browser/shell_dialogs.h" -#if defined(OS_MACOSX) -#include "chrome/browser/dom_ui/advanced_options_utils_mac.h" -#endif - // Chrome advanced options page UI handler. class AdvancedOptionsHandler : public OptionsPageUIHandler, @@ -57,6 +53,16 @@ class AdvancedOptionsHandler void HandleUseSSL2Checkbox(const Value* value); #endif +#if !defined(OS_CHROMEOS) + // Callback for the "showNetworkProxySettings" message. This will invoke + // an appropriate dialog for configuring proxy settings. + void ShowNetworkProxySettings(const Value* value); + + // Callback for the "showManageSSLCertificates" message. This will invoke + // an appropriate certificate management action based on the platform. + void ShowManageSSLCertificates(const Value* value); +#endif + // Setup the download path based on user preferences. void SetupDownloadLocationPath(); @@ -68,14 +74,6 @@ class AdvancedOptionsHandler void SetupSSLConfigSettings(); #endif - // Callback for the "showNetworkProxySettings" message. This will invoke - // an appropriate dialog for configuring proxy settings. - void ShowNetworkProxySettings(const Value* value); - - // Callback for the "showManageSSLCertificates" message. This will invoke - // an appropriate certificate management action based on the platform. - void ShowManageSSLCertificates(const Value* value); - scoped_refptr<SelectFileDialog> select_folder_dialog_; FilePathPrefMember default_download_location_; StringPrefMember auto_open_files_; diff --git a/chrome/browser/dom_ui/advanced_options_utils.h b/chrome/browser/dom_ui/advanced_options_utils.h new file mode 100644 index 0000000..669fcf7 --- /dev/null +++ b/chrome/browser/dom_ui/advanced_options_utils.h @@ -0,0 +1,25 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_DOM_UI_ADVANCED_OPTIONS_UTILS_H_ +#define CHROME_BROWSER_DOM_UI_ADVANCED_OPTIONS_UTILS_H_ + +#include "base/basictypes.h" + +class TabContents; + +// Chrome advanced options utility methods. +class AdvancedOptionsUtilities { + public: + // Invoke UI for network proxy settings. + static void ShowNetworkProxySettings(TabContents*); + + // Invoke UI for SSL certificates. + static void ShowManageSSLCertificates(TabContents*); + + private: + DISALLOW_IMPLICIT_CONSTRUCTORS(AdvancedOptionsUtilities); +}; + +#endif // CHROME_BROWSER_DOM_UI_ADVANCED_OPTIONS_UTILS_H_ diff --git a/chrome/browser/dom_ui/advanced_options_utils_gtk.cc b/chrome/browser/dom_ui/advanced_options_utils_gtk.cc new file mode 100644 index 0000000..6cbf8d6 --- /dev/null +++ b/chrome/browser/dom_ui/advanced_options_utils_gtk.cc @@ -0,0 +1,132 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#if !defined(OS_CHROMEOS) + +#include "chrome/browser/dom_ui/advanced_options_utils.h" + +#include "app/gtk_signal.h" +#include "app/gtk_util.h" +#include "base/file_util.h" +#include "base/env_var.h" +#include "base/process_util.h" +#include "base/string_tokenizer.h" +#include "base/xdg_util.h" +#include "chrome/browser/browser_list.h" +#include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/common/process_watcher.h" + +// Command used to configure GNOME proxy settings. The command was renamed +// in January 2009, so both are used to work on both old and new systems. +const char* kOldGNOMEProxyConfigCommand[] = {"gnome-network-preferences", NULL}; +const char* kGNOMEProxyConfigCommand[] = {"gnome-network-properties", NULL}; +// KDE3 and KDE4 are only slightly different, but incompatible. Go figure. +const char* kKDE3ProxyConfigCommand[] = {"kcmshell", "proxy", NULL}; +const char* kKDE4ProxyConfigCommand[] = {"kcmshell4", "proxy", NULL}; + +// The URL for Linux proxy configuration help when not running under a +// supported desktop environment. +const char kLinuxProxyConfigUrl[] = "about:linux-proxy-config"; + +// The URL for Linux ssl certificate configuration help. +const char* const kLinuxCertificatesConfigUrl = + "http://code.google.com/p/chromium/wiki/LinuxCertManagement"; + + +struct ProxyConfigCommand { + std::string binary; + const char** argv; +}; + +static bool SearchPATH(ProxyConfigCommand* commands, size_t ncommands, + size_t* index) { + const char* path = getenv("PATH"); + if (!path) + return false; + FilePath bin_path; + CStringTokenizer tk(path, path + strlen(path), ":"); + // Search $PATH looking for the commands in order. + while (tk.GetNext()) { + for (size_t i = 0; i < ncommands; i++) { + bin_path = FilePath(tk.token()).Append(commands[i].argv[0]); + if (file_util::PathExists(bin_path)) { + commands[i].binary = bin_path.value(); + if (index) + *index = i; + return true; + } + } + } + // Did not find any of the binaries in $PATH. + return false; +} + +static void StartProxyConfigUtil(const ProxyConfigCommand& command) { + std::vector<std::string> argv; + argv.push_back(command.binary); + for (size_t i = 1; command.argv[i]; i++) + argv.push_back(command.argv[i]); + base::file_handle_mapping_vector no_files; + base::ProcessHandle handle; + if (!base::LaunchApp(argv, no_files, false, &handle)) { + LOG(ERROR) << "StartProxyConfigUtil failed to start " << command.binary; + BrowserList::GetLastActive()-> + OpenURL(GURL(kLinuxProxyConfigUrl), GURL(), NEW_FOREGROUND_TAB, + PageTransition::LINK); + return; + } + ProcessWatcher::EnsureProcessGetsReaped(handle); +} + +void AdvancedOptionsUtilities::ShowNetworkProxySettings( + TabContents* tab_contents) { + scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create()); + + ProxyConfigCommand command; + bool found_command = false; + switch (base::GetDesktopEnvironment(env_getter.get())) { + case base::DESKTOP_ENVIRONMENT_GNOME: { + size_t index; + ProxyConfigCommand commands[2]; + commands[0].argv = kGNOMEProxyConfigCommand; + commands[1].argv = kOldGNOMEProxyConfigCommand; + found_command = SearchPATH(commands, 2, &index); + if (found_command) + command = commands[index]; + break; + } + + case base::DESKTOP_ENVIRONMENT_KDE3: + command.argv = kKDE3ProxyConfigCommand; + found_command = SearchPATH(&command, 1, NULL); + break; + + case base::DESKTOP_ENVIRONMENT_KDE4: + command.argv = kKDE4ProxyConfigCommand; + found_command = SearchPATH(&command, 1, NULL); + break; + + case base::DESKTOP_ENVIRONMENT_XFCE: + case base::DESKTOP_ENVIRONMENT_OTHER: + break; + } + + if (found_command) { + StartProxyConfigUtil(command); + } else { + const char* name = base::GetDesktopEnvironmentName(env_getter.get()); + if (name) + LOG(ERROR) << "Could not find " << name << " network settings in $PATH"; + tab_contents->OpenURL(GURL(kLinuxProxyConfigUrl), GURL(), + NEW_FOREGROUND_TAB, PageTransition::LINK); + } +} + +void AdvancedOptionsUtilities::ShowManageSSLCertificates( + TabContents* tab_contents) { + tab_contents->OpenURL(GURL(kLinuxCertificatesConfigUrl), GURL(), + NEW_WINDOW, PageTransition::LINK); +} + +#endif // !defined(OS_CHROMEOS) diff --git a/chrome/browser/dom_ui/advanced_options_utils_mac.mm b/chrome/browser/dom_ui/advanced_options_utils_mac.mm index c4784f0..51bede2 100644 --- a/chrome/browser/dom_ui/advanced_options_utils_mac.mm +++ b/chrome/browser/dom_ui/advanced_options_utils_mac.mm @@ -4,10 +4,11 @@ #import <Cocoa/Cocoa.h> -#include "chrome/browser/dom_ui/advanced_options_utils_mac.h" +#include "chrome/browser/dom_ui/advanced_options_utils.h" #include "base/logging.h" -void AdvancedOptionsUtilities::ShowNetworkProxySettings() { +void AdvancedOptionsUtilities::ShowNetworkProxySettings( + TabContents* tab_contents) { NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath: @"/System/Library/PreferencePanes/Network.prefPane"]]; @@ -29,7 +30,8 @@ void AdvancedOptionsUtilities::ShowNetworkProxySettings() { AEDisposeDesc(&openParams); } -void AdvancedOptionsUtilities::ShowManageSSLCertificates() { +void AdvancedOptionsUtilities::ShowManageSSLCertificates( + TabContents* tab_contents) { NSString* const kKeychainBundleId = @"com.apple.keychainaccess"; [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:kKeychainBundleId diff --git a/chrome/browser/dom_ui/advanced_options_utils_win.cc b/chrome/browser/dom_ui/advanced_options_utils_win.cc new file mode 100644 index 0000000..cbff7d3 --- /dev/null +++ b/chrome/browser/dom_ui/advanced_options_utils_win.cc @@ -0,0 +1,67 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/dom_ui/advanced_options_utils.h" + +#include <windows.h> +#include <cryptuiapi.h> +#pragma comment(lib, "cryptui.lib") +#include <shellapi.h> + +#include "base/file_util.h" +#include "base/path_service.h" +#include "base/thread.h" +#include "chrome/browser/browser_process.h" +#include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/tab_contents/tab_contents_view.h" + +// A helper method that opens the Internet Options control panel dialog with +// the Connections tab selected. +class OpenConnectionDialogTask : public Task { + public: + OpenConnectionDialogTask() {} + + virtual void Run() { + // Using rundll32 seems better than LaunchConnectionDialog which causes a + // new dialog to be made for each call. rundll32 uses the same global + // dialog and it seems to share with the shortcut in control panel. + FilePath rundll32; + PathService::Get(base::DIR_SYSTEM, &rundll32); + rundll32 = rundll32.AppendASCII("rundll32.exe"); + + FilePath shell32dll; + PathService::Get(base::DIR_SYSTEM, &shell32dll); + shell32dll = shell32dll.AppendASCII("shell32.dll"); + + FilePath inetcpl; + PathService::Get(base::DIR_SYSTEM, &inetcpl); + inetcpl = inetcpl.AppendASCII("inetcpl.cpl,,4"); + + std::wstring args(shell32dll.value()); + args.append(L",Control_RunDLL "); + args.append(inetcpl.value()); + + ShellExecute(NULL, L"open", rundll32.value().c_str(), args.c_str(), NULL, + SW_SHOWNORMAL); + } + + private: + DISALLOW_COPY_AND_ASSIGN(OpenConnectionDialogTask); +}; + +void AdvancedOptionsUtilities::ShowNetworkProxySettings( + TabContents* tab_contents) { + base::Thread* thread = g_browser_process->file_thread(); + DCHECK(thread); + thread->message_loop()->PostTask(FROM_HERE, new OpenConnectionDialogTask); +} + +void AdvancedOptionsUtilities::ShowManageSSLCertificates( + TabContents* tab_contents) { + CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 }; + cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); + cert_mgr.hwndParent = + tab_contents->view()->GetTopLevelNativeWindow(); + ::CryptUIDlgCertMgr(&cert_mgr); +} diff --git a/chrome/browser/resources/options/advanced_options.html b/chrome/browser/resources/options/advanced_options.html index 3cefd7c..eeec8f7 100644 --- a/chrome/browser/resources/options/advanced_options.html +++ b/chrome/browser/resources/options/advanced_options.html @@ -37,15 +37,16 @@ pref="safebrowsing.enabled" type="checkbox"><span i18n-content="safeBrowsingEnableProtection"></span></label></td> </tr> - <if expr="pp_ifdef('_google_chrome')"> - <tr id="metricsReportingCheckbox"> - <td class="option-name"><label><input id="metricsReportingEnabled" - pref="user_experience_metrics.reporting_enabled" type="checkbox"> - <span i18n-content="enableLogging"></span></label></td> - </tr> - </if> +<if expr="pp_ifdef('_google_chrome')"> + <tr id="metricsReportingCheckbox"> + <td class="option-name"><label><input id="metricsReportingEnabled" + pref="user_experience_metrics.reporting_enabled" type="checkbox"> + <span i18n-content="enableLogging"></span></label></td> + </tr> +</if> </table> </section> +<if expr="not pp_ifdef('chromeos')"> <section> <h3 i18n-content="advancedSectionTitleNetwork"></h3> <table class="option-control-table"> @@ -59,6 +60,7 @@ </td></tr> </table> </section> +</if> <section> <h3 i18n-content="advancedSectionTitleTranslate"></h3> <table class="option-control-table"> @@ -96,19 +98,20 @@ <section> <h3 i18n-content="advancedSectionTitleContent"></h3> <table class="option-control-table"> - <if expr="os == 'darwin'"> - <tr id="tabsToLinksCheckbox"> - <td class="option-name"><label><input id="tabsToLinksPref" - pref="webkit.webprefs.tabs_to_links" type="checkbox"><span - i18n-content="tabsToLinksPref"></span></label></td> - </tr> - </if> +<if expr="os == 'darwin'"> + <tr id="tabsToLinksCheckbox"> + <td class="option-name"><label><input id="tabsToLinksPref" + pref="webkit.webprefs.tabs_to_links" type="checkbox"><span + i18n-content="tabsToLinksPref"></span></label></td> + </tr> +</if> <tr id="fontSettingsConfigureFontsOnlyButton"><td> <button id="fontSettingsConfigureFontsOnlyButton" i18n-content="fontSettingsConfigureFontsOnlyButton"></button> </td></tr> </table> </section> +<if expr="not pp_ifdef('chromeos')"> <section> <h3 i18n-content="advancedSectionTitleSecurity"></h3> <table class="option-control-table"> @@ -118,42 +121,45 @@ <button id="certificatesManageButton" i18n-content="certificatesManageButton"></button> </td></tr> - <if expr="os == 'win32'"> - <!-- Configure these options for manual handling on windows --> - <tr id="sslCheckRevocationCheckbox"> - <td class="option-name"><label><input id="sslCheckRevocation" - type="checkbox"><span i18n-content="sslCheckRevocation"></span> - </label></td> - </tr> - <tr id="sslUseSSL2Checkbox"> - <td class="option-name"><label><input id="sslUseSSL2" - type="checkbox"><span i18n-content="sslUseSSL2"></span> - </label></td> - </tr> - </if> - <if expr="os == 'linux2' or os.find('bsd') != -1"> - <!-- Configure these options for Linux/BSD as preference keys --> - <tr id="sslCheckRevocationCheckbox"> - <td class="option-name"><label><input id="sslCheckRevocation" - pref="ssl.rev_checking.enabled" type="checkbox"><span - i18n-content="sslCheckRevocation"></span></label></td> - </tr> - <tr id="sslUseSSL2Checkbox"> - <td class="option-name"><label><input id="sslUseSSL2" - pref="ssl.ssl2.enabled" type="checkbox"><span - i18n-content="sslUseSSL2"></span></label></td> - </tr> - <tr id="sslUseSSL3Checkbox"> - <td class="option-name"><label><input id="sslUseSSL3" - pref="ssl.ssl3.enabled" type="checkbox"><span - i18n-content="sslUseSSL3"></span></label></td> - </tr> - <tr id="sslUseTLS1Checkbox"> - <td class="option-name"><label><input id="sslUseTLS1" - pref="ssl.tls1.enabled" type="checkbox"><span - i18n-content="sslUseTLS1"></span></label></td> - </tr> - </if> +</if> +<if expr="os == 'win32'"> + <!-- Configure these options for manual handling on windows --> + <tr id="sslCheckRevocationCheckbox"> + <td class="option-name"><label><input id="sslCheckRevocation" + type="checkbox"><span i18n-content="sslCheckRevocation"></span> + </label></td> + </tr> + <tr id="sslUseSSL2Checkbox"> + <td class="option-name"><label><input id="sslUseSSL2" + type="checkbox"><span i18n-content="sslUseSSL2"></span> + </label></td> + </tr> +</if> +<if expr="not pp_ifdef('chromeos') and (os == 'linux2' or os.find('bsd') != -1)"> + <!-- Configure these options for Linux/BSD as preference keys --> + <tr id="sslCheckRevocationCheckbox"> + <td class="option-name"><label><input id="sslCheckRevocation" + pref="ssl.rev_checking.enabled" type="checkbox"><span + i18n-content="sslCheckRevocation"></span></label></td> + </tr> + <tr id="sslUseSSL2Checkbox"> + <td class="option-name"><label><input id="sslUseSSL2" + pref="ssl.ssl2.enabled" type="checkbox"><spa + i18n-content="sslUseSSL2"></span></label></td> + </tr> + <tr id="sslUseSSL3Checkbox"> + <td class="option-name"><label><input id="sslUseSSL3" + pref="ssl.ssl3.enabled" type="checkbox"><span + i18n-content="sslUseSSL3"></span></label></td> + </tr> + <tr id="sslUseTLS1Checkbox"> + <td class="option-name"><label><input id="sslUseTLS1" + pref="ssl.tls1.enabled" type="checkbox"><span + i18n-content="sslUseTLS1"></span></label></td> + </tr> +</if> +<if expr="not pp_ifdef('chromeos')"> </table> </section> +</if> </div> diff --git a/chrome/browser/resources/options/advanced_options.js b/chrome/browser/resources/options/advanced_options.js index 0f2a3c4..1713ddf 100644 --- a/chrome/browser/resources/options/advanced_options.js +++ b/chrome/browser/resources/options/advanced_options.js @@ -28,9 +28,6 @@ AdvancedOptions.prototype = { $('privacyClearDataButton').onclick = function(event) { OptionsPage.showOverlay('clearBrowserDataOverlay'); }; - $('proxiesConfigureButton').onclick = function(event) { - chrome.send('showNetworkProxySettings'); - }; $('downloadLocationBrowseButton').onclick = function(event) { chrome.send('selectDownloadLocation'); }; @@ -40,9 +37,15 @@ AdvancedOptions.prototype = { $('fontSettingsConfigureFontsOnlyButton').onclick = function(event) { OptionsPage.showOverlay('fontSettingsOverlay'); }; - $('certificatesManageButton').onclick = function(event) { - chrome.send('showManageSSLCertificates'); - }; + + if (!cr.isChromeOS) { + $('proxiesConfigureButton').onclick = function(event) { + chrome.send('showNetworkProxySettings'); + }; + $('certificatesManageButton').onclick = function(event) { + chrome.send('showManageSSLCertificates'); + }; + } if (cr.isWindows) { $('sslCheckRevocation').onclick = function(event) { diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index d1d99da..b2bd6c5 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1096,8 +1096,10 @@ 'browser/dom_ui/add_startup_page_handler.h', 'browser/dom_ui/advanced_options_handler.cc', 'browser/dom_ui/advanced_options_handler.h', + 'browser/dom_ui/advanced_options_utils.h', + 'browser/dom_ui/advanced_options_utils_gtk.cc', 'browser/dom_ui/advanced_options_utils_mac.mm', - 'browser/dom_ui/advanced_options_utils_mac.h', + 'browser/dom_ui/advanced_options_utils_win.cc', 'browser/dom_ui/browser_options_handler.cc', 'browser/dom_ui/browser_options_handler.h', 'browser/dom_ui/clear_browser_data_handler.cc', |