Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1354)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 123383002: Enable SDCH support over HTTPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/sdch_manager.h » ('j') | net/base/sdch_manager.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..421aa63f5460542292e8049a8a697b5058be6da5 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1391,12 +1391,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
GoogleSearchCounter::RegisterForNotifications();
// Disable SDCH filtering if switches::kEnableSdch is 0.
jar (doing other things) 2014/01/03 18:35:13 Nit: Change comment to something more like: // SD
mef 2014/01/03 20:26:55 Done.
- int sdch_enabled = 1;
+ const int kSdchDisabled = 0;
+ const int kSdchEnabled = 1;
jar (doing other things) 2014/01/03 18:35:13 nit: kSdchOverHttpEnabled
mef 2014/01/03 20:26:55 Done.
+ const int kSdchOverSecureEnabled = 2;
jar (doing other things) 2014/01/03 18:35:13 nit: kSdchOverBothHttpAndHttpsEnabled
mef 2014/01/03 20:26:55 Done.
+ int sdch_enabled = kSdchEnabled;
if (parsed_command_line().HasSwitch(switches::kEnableSdch)) {
base::StringToInt(parsed_command_line().GetSwitchValueASCII(
switches::kEnableSdch), &sdch_enabled);
- if (!sdch_enabled)
+ if (sdch_enabled == kSdchDisabled)
net::SdchManager::EnableSdchSupport(false);
+ if (sdch_enabled == kSdchOverSecureEnabled)
jar (doing other things) 2014/01/03 18:35:13 nit: else if
mef 2014/01/03 20:26:55 Done.
+ net::SdchManager::EnableSdchOverSecureSupport(true);
}
if (parsed_command_line().HasSwitch(switches::kEnableWatchdog))
« no previous file with comments | « no previous file | net/base/sdch_manager.h » ('j') | net/base/sdch_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698