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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 593863002: Enable SDCH over HTTPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct test default assumptions. Created 6 years, 3 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.cc » ('j') | no next file with comments »
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 2a261b94cbc99772ec463610a7e438e1ec141b4e..ed87ac28c6cfeaf49c6fd14d2ab2d2617356f724 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1374,28 +1374,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->intranet_redirect_detector();
GoogleSearchCounter::RegisterForNotifications();
- if (parsed_command_line().HasSwitch(switches::kEnableSdchOverHttps)) {
- net::SdchManager::EnableSecureSchemeSupport(true);
- } else {
- // Check SDCH field trial.
- const char kSdchFieldTrialName[] = "SDCH";
- const char kEnabledAllGroupName[] = "EnabledAll";
- const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly";
- const char kDisabledAllGroupName[] = "DisabledAll";
-
- // Store in a string on return to keep underlying storage for
- // StringPiece stable.
- std::string sdch_trial_group_string =
- base::FieldTrialList::FindFullName(kSdchFieldTrialName);
- base::StringPiece sdch_trial_group(sdch_trial_group_string);
- if (sdch_trial_group.starts_with(kEnabledAllGroupName)) {
- net::SdchManager::EnableSecureSchemeSupport(true);
- net::SdchManager::EnableSdchSupport(true);
- } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) {
- net::SdchManager::EnableSdchSupport(true);
- } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) {
- net::SdchManager::EnableSdchSupport(false);
- }
+ // Check SDCH field trial. Default is now that everything is enabled,
+ // so provide options for disabling HTTPS or all of SDCH.
+ const char kSdchFieldTrialName[] = "SDCH";
+ const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly";
+ const char kDisabledAllGroupName[] = "DisabledAll";
+
+ // Store in a string on return to keep underlying storage for
+ // StringPiece stable.
+ std::string sdch_trial_group_string =
+ base::FieldTrialList::FindFullName(kSdchFieldTrialName);
+ base::StringPiece sdch_trial_group(sdch_trial_group_string);
+ if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) {
+ net::SdchManager::EnableSdchSupport(true);
+ net::SdchManager::EnableSecureSchemeSupport(false);
+ } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) {
+ net::SdchManager::EnableSdchSupport(false);
}
#if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD)
« no previous file with comments | « no previous file | net/base/sdch_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698