| 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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 // | 1360 // |
| 1361 // A simpler way of doing all this would be to have some function which could | 1361 // A simpler way of doing all this would be to have some function which could |
| 1362 // give the time elapsed since startup, and simply have this object check that | 1362 // give the time elapsed since startup, and simply have this object check that |
| 1363 // when asked to initialize itself, but this doesn't seem to exist. | 1363 // when asked to initialize itself, but this doesn't seem to exist. |
| 1364 // | 1364 // |
| 1365 // This can't be created in the BrowserProcessImpl constructor because it | 1365 // This can't be created in the BrowserProcessImpl constructor because it |
| 1366 // needs to read prefs that get set after that runs. | 1366 // needs to read prefs that get set after that runs. |
| 1367 browser_process_->intranet_redirect_detector(); | 1367 browser_process_->intranet_redirect_detector(); |
| 1368 GoogleSearchCounter::RegisterForNotifications(); | 1368 GoogleSearchCounter::RegisterForNotifications(); |
| 1369 | 1369 |
| 1370 // Disable SDCH filtering if switches::kEnableSdch is 0. |
| 1371 int sdch_enabled = 1; |
| 1370 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { | 1372 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { |
| 1371 // SDCH options via switches::kEnableSdch include: | 1373 base::StringToInt(parsed_command_line().GetSwitchValueASCII( |
| 1372 const int kSdchDisabled = 0; | 1374 switches::kEnableSdch), &sdch_enabled); |
| 1373 const int kSdchOverHttpEnabled = 1; | 1375 if (!sdch_enabled) |
| 1374 const int kSdchOverBothHttpAndHttpsEnabled = 2; | 1376 net::SdchManager::EnableSdchSupport(false); |
| 1375 int sdch_enabled = kSdchOverHttpEnabled; | |
| 1376 if (base::StringToInt(parsed_command_line().GetSwitchValueASCII( | |
| 1377 switches::kEnableSdch), &sdch_enabled)) { | |
| 1378 if (sdch_enabled == kSdchDisabled) { | |
| 1379 net::SdchManager::EnableSdchSupport(false); | |
| 1380 } else if (sdch_enabled == kSdchOverBothHttpAndHttpsEnabled) { | |
| 1381 net::SdchManager::EnableSecureSchemeSupport(true); | |
| 1382 } | |
| 1383 } | |
| 1384 } | 1377 } |
| 1385 | 1378 |
| 1386 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) | 1379 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) |
| 1387 InstallJankometer(parsed_command_line()); | 1380 InstallJankometer(parsed_command_line()); |
| 1388 | 1381 |
| 1389 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 1382 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
| 1390 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1383 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
| 1391 base::FilePath path = | 1384 base::FilePath path = |
| 1392 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1385 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
| 1393 printing::PrintedDocument::set_debug_dump_path(path); | 1386 printing::PrintedDocument::set_debug_dump_path(path); |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 chromeos::CrosSettings::Shutdown(); | 1668 chromeos::CrosSettings::Shutdown(); |
| 1676 #endif | 1669 #endif |
| 1677 #endif | 1670 #endif |
| 1678 } | 1671 } |
| 1679 | 1672 |
| 1680 // Public members: | 1673 // Public members: |
| 1681 | 1674 |
| 1682 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1675 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1683 chrome_extra_parts_.push_back(parts); | 1676 chrome_extra_parts_.push_back(parts); |
| 1684 } | 1677 } |
| OLD | NEW |