Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index d8cdf79b4660e56fced981967f2d85995235898e..c224239c3c1c5e0a2e37439437e8443fb782420c 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -1390,13 +1390,19 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
| browser_process_->intranet_redirect_detector(); |
| GoogleSearchCounter::RegisterForNotifications(); |
| - // Disable SDCH filtering if switches::kEnableSdch is 0. |
| - int sdch_enabled = 1; |
| + // SDCH options via switches::kEnableSdch include: |
|
Lei Zhang
2014/01/08 19:42:23
nit: you can declare these inside the if() block b
jar (doing other things)
2014/01/08 23:46:18
+1
mef
2014/01/09 16:23:53
Done.
|
| + const int kSdchDisabled = 0; |
| + const int kSdchOverHttpEnabled = 1; |
| + const int kSdchOverBothHttpAndHttpsEnabled = 2; |
| + int sdch_enabled = kSdchOverHttpEnabled; |
| if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { |
| base::StringToInt(parsed_command_line().GetSwitchValueASCII( |
|
Lei Zhang
2014/01/08 19:42:23
If you care about 'imperfect conversions' as defin
mef
2014/01/09 16:23:53
Done.
|
| switches::kEnableSdch), &sdch_enabled); |
| - if (!sdch_enabled) |
| + if (sdch_enabled == kSdchDisabled) { |
| net::SdchManager::EnableSdchSupport(false); |
| + } else if (sdch_enabled == kSdchOverBothHttpAndHttpsEnabled) { |
| + net::SdchManager::EnableSecureSchemeSupport(true); |
| + } |
| } |
| if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) |