OLD | NEW |
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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 // | 1395 // |
1396 // A simpler way of doing all this would be to have some function which could | 1396 // A simpler way of doing all this would be to have some function which could |
1397 // give the time elapsed since startup, and simply have this object check that | 1397 // give the time elapsed since startup, and simply have this object check that |
1398 // when asked to initialize itself, but this doesn't seem to exist. | 1398 // when asked to initialize itself, but this doesn't seem to exist. |
1399 // | 1399 // |
1400 // This can't be created in the BrowserProcessImpl constructor because it | 1400 // This can't be created in the BrowserProcessImpl constructor because it |
1401 // needs to read prefs that get set after that runs. | 1401 // needs to read prefs that get set after that runs. |
1402 browser_process_->intranet_redirect_detector(); | 1402 browser_process_->intranet_redirect_detector(); |
1403 GoogleSearchCounter::RegisterForNotifications(); | 1403 GoogleSearchCounter::RegisterForNotifications(); |
1404 | 1404 |
1405 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { | 1405 if (parsed_command_line().HasSwitch(switches::kEnableSdchOverHttps)) { |
1406 // SDCH options via switches::kEnableSdch include: | 1406 net::SdchManager::EnableSecureSchemeSupport(true); |
1407 const int kSdchDisabled = 0; | |
1408 const int kSdchOverHttpEnabled = 1; | |
1409 const int kSdchOverBothHttpAndHttpsEnabled = 2; | |
1410 int sdch_enabled = kSdchOverHttpEnabled; | |
1411 if (base::StringToInt(parsed_command_line().GetSwitchValueASCII( | |
1412 switches::kEnableSdch), &sdch_enabled)) { | |
1413 if (sdch_enabled == kSdchDisabled) { | |
1414 net::SdchManager::EnableSdchSupport(false); | |
1415 } else if (sdch_enabled == kSdchOverBothHttpAndHttpsEnabled) { | |
1416 net::SdchManager::EnableSecureSchemeSupport(true); | |
1417 } | |
1418 } | |
1419 } | 1407 } |
1420 | 1408 |
1421 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) | 1409 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) |
1422 InstallJankometer(parsed_command_line()); | 1410 InstallJankometer(parsed_command_line()); |
1423 | 1411 |
1424 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 1412 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
1425 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1413 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1426 base::FilePath path = | 1414 base::FilePath path = |
1427 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1415 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1428 printing::PrintedDocument::set_debug_dump_path(path); | 1416 printing::PrintedDocument::set_debug_dump_path(path); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 chromeos::CrosSettings::Shutdown(); | 1696 chromeos::CrosSettings::Shutdown(); |
1709 #endif | 1697 #endif |
1710 #endif | 1698 #endif |
1711 } | 1699 } |
1712 | 1700 |
1713 // Public members: | 1701 // Public members: |
1714 | 1702 |
1715 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1703 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1716 chrome_extra_parts_.push_back(parts); | 1704 chrome_extra_parts_.push_back(parts); |
1717 } | 1705 } |
OLD | NEW |