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

Side by Side 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: Address codereview comments. Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/sdch_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 // 1381 //
1382 // A simpler way of doing all this would be to have some function which could 1382 // A simpler way of doing all this would be to have some function which could
1383 // give the time elapsed since startup, and simply have this object check that 1383 // give the time elapsed since startup, and simply have this object check that
1384 // when asked to initialize itself, but this doesn't seem to exist. 1384 // when asked to initialize itself, but this doesn't seem to exist.
1385 // 1385 //
1386 // This can't be created in the BrowserProcessImpl constructor because it 1386 // This can't be created in the BrowserProcessImpl constructor because it
1387 // needs to read prefs that get set after that runs. 1387 // needs to read prefs that get set after that runs.
1388 browser_process_->intranet_redirect_detector(); 1388 browser_process_->intranet_redirect_detector();
1389 GoogleSearchCounter::RegisterForNotifications(); 1389 GoogleSearchCounter::RegisterForNotifications();
1390 1390
1391 // Disable SDCH filtering if switches::kEnableSdch is 0.
1392 int sdch_enabled = 1;
1393 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { 1391 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) {
1394 base::StringToInt(parsed_command_line().GetSwitchValueASCII( 1392 // SDCH options via switches::kEnableSdch include:
1395 switches::kEnableSdch), &sdch_enabled); 1393 const int kSdchDisabled = 0;
1396 if (!sdch_enabled) 1394 const int kSdchOverHttpEnabled = 1;
1397 net::SdchManager::EnableSdchSupport(false); 1395 const int kSdchOverBothHttpAndHttpsEnabled = 2;
1396 int sdch_enabled = kSdchOverHttpEnabled;
1397 if (base::StringToInt(parsed_command_line().GetSwitchValueASCII(
1398 switches::kEnableSdch), &sdch_enabled)) {
1399 if (sdch_enabled == kSdchDisabled) {
1400 net::SdchManager::EnableSdchSupport(false);
1401 } else if (sdch_enabled == kSdchOverBothHttpAndHttpsEnabled) {
1402 net::SdchManager::EnableSecureSchemeSupport(true);
1403 }
1404 }
1398 } 1405 }
1399 1406
1400 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) 1407 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog))
1401 InstallJankometer(parsed_command_line()); 1408 InstallJankometer(parsed_command_line());
1402 1409
1403 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) 1410 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD)
1404 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { 1411 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) {
1405 base::FilePath path = 1412 base::FilePath path =
1406 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); 1413 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint);
1407 printing::PrintedDocument::set_debug_dump_path(path); 1414 printing::PrintedDocument::set_debug_dump_path(path);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 chromeos::CrosSettings::Shutdown(); 1696 chromeos::CrosSettings::Shutdown();
1690 #endif 1697 #endif
1691 #endif 1698 #endif
1692 } 1699 }
1693 1700
1694 // Public members: 1701 // Public members:
1695 1702
1696 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1703 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1697 chrome_extra_parts_.push_back(parts); 1704 chrome_extra_parts_.push_back(parts);
1698 } 1705 }
OLDNEW
« no previous file with comments | « no previous file | net/base/sdch_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698