OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/options/advanced_options_handler.h" | 5 #include "chrome/browser/dom_ui/options/advanced_options_handler.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 NewCallback(this, | 202 NewCallback(this, |
203 &AdvancedOptionsHandler::HandleAutoOpenButton)); | 203 &AdvancedOptionsHandler::HandleAutoOpenButton)); |
204 dom_ui_->RegisterMessageCallback("resetToDefaults", | 204 dom_ui_->RegisterMessageCallback("resetToDefaults", |
205 NewCallback(this, | 205 NewCallback(this, |
206 &AdvancedOptionsHandler::HandleResetToDefaults)); | 206 &AdvancedOptionsHandler::HandleResetToDefaults)); |
207 #if !defined(OS_CHROMEOS) | 207 #if !defined(OS_CHROMEOS) |
208 dom_ui_->RegisterMessageCallback("metricsReportingCheckboxAction", | 208 dom_ui_->RegisterMessageCallback("metricsReportingCheckboxAction", |
209 NewCallback(this, | 209 NewCallback(this, |
210 &AdvancedOptionsHandler::HandleMetricsReportingCheckbox)); | 210 &AdvancedOptionsHandler::HandleMetricsReportingCheckbox)); |
211 #endif | 211 #endif |
212 #if !defined(USE_NSS) | 212 #if !defined(USE_NSS) && !defined(USE_OPENSSL) |
213 dom_ui_->RegisterMessageCallback("showManageSSLCertificates", | 213 dom_ui_->RegisterMessageCallback("showManageSSLCertificates", |
214 NewCallback(this, | 214 NewCallback(this, |
215 &AdvancedOptionsHandler::ShowManageSSLCertificates)); | 215 &AdvancedOptionsHandler::ShowManageSSLCertificates)); |
216 #endif | 216 #endif |
217 #if !defined(OS_CHROMEOS) | 217 #if !defined(OS_CHROMEOS) |
218 dom_ui_->RegisterMessageCallback("showNetworkProxySettings", | 218 dom_ui_->RegisterMessageCallback("showNetworkProxySettings", |
219 NewCallback(this, | 219 NewCallback(this, |
220 &AdvancedOptionsHandler::ShowNetworkProxySettings)); | 220 &AdvancedOptionsHandler::ShowNetworkProxySettings)); |
221 #endif | 221 #endif |
222 | 222 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 } | 348 } |
349 #endif | 349 #endif |
350 | 350 |
351 #if !defined(OS_CHROMEOS) | 351 #if !defined(OS_CHROMEOS) |
352 void AdvancedOptionsHandler::ShowNetworkProxySettings(const ListValue* args) { | 352 void AdvancedOptionsHandler::ShowNetworkProxySettings(const ListValue* args) { |
353 UserMetricsRecordAction(UserMetricsAction("Options_ShowProxySettings")); | 353 UserMetricsRecordAction(UserMetricsAction("Options_ShowProxySettings")); |
354 AdvancedOptionsUtilities::ShowNetworkProxySettings(dom_ui_->tab_contents()); | 354 AdvancedOptionsUtilities::ShowNetworkProxySettings(dom_ui_->tab_contents()); |
355 } | 355 } |
356 #endif | 356 #endif |
357 | 357 |
358 #if !defined(USE_NSS) | 358 #if !defined(USE_NSS) && !defined(USE_OPENSSL) |
359 void AdvancedOptionsHandler::ShowManageSSLCertificates(const ListValue* args) { | 359 void AdvancedOptionsHandler::ShowManageSSLCertificates(const ListValue* args) { |
360 UserMetricsRecordAction(UserMetricsAction("Options_ManageSSLCertificates")); | 360 UserMetricsRecordAction(UserMetricsAction("Options_ManageSSLCertificates")); |
361 AdvancedOptionsUtilities::ShowManageSSLCertificates(dom_ui_->tab_contents()); | 361 AdvancedOptionsUtilities::ShowManageSSLCertificates(dom_ui_->tab_contents()); |
362 } | 362 } |
363 #endif | 363 #endif |
364 | 364 |
365 void AdvancedOptionsHandler::SetupMetricsReportingCheckbox(bool user_changed) { | 365 void AdvancedOptionsHandler::SetupMetricsReportingCheckbox(bool user_changed) { |
366 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 366 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
367 FundamentalValue checked(enable_metrics_recording_.GetValue()); | 367 FundamentalValue checked(enable_metrics_recording_.GetValue()); |
368 FundamentalValue disabled(enable_metrics_recording_.IsManaged()); | 368 FundamentalValue disabled(enable_metrics_recording_.IsManaged()); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 FundamentalValue useSSL3Value(useSSL3Setting); | 444 FundamentalValue useSSL3Value(useSSL3Setting); |
445 dom_ui_->CallJavascriptFunction( | 445 dom_ui_->CallJavascriptFunction( |
446 L"options.AdvancedOptions.SetUseSSL3CheckboxState", | 446 L"options.AdvancedOptions.SetUseSSL3CheckboxState", |
447 useSSL3Value, disabledValue); | 447 useSSL3Value, disabledValue); |
448 FundamentalValue useTLS1Value(useTLS1Setting); | 448 FundamentalValue useTLS1Value(useTLS1Setting); |
449 dom_ui_->CallJavascriptFunction( | 449 dom_ui_->CallJavascriptFunction( |
450 L"options.AdvancedOptions.SetUseTLS1CheckboxState", | 450 L"options.AdvancedOptions.SetUseTLS1CheckboxState", |
451 useTLS1Value, disabledValue); | 451 useTLS1Value, disabledValue); |
452 } | 452 } |
453 #endif | 453 #endif |
OLD | NEW |