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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1383 // | 1383 // |
1384 // A simpler way of doing all this would be to have some function which could | 1384 // A simpler way of doing all this would be to have some function which could |
1385 // give the time elapsed since startup, and simply have this object check that | 1385 // give the time elapsed since startup, and simply have this object check that |
1386 // when asked to initialize itself, but this doesn't seem to exist. | 1386 // when asked to initialize itself, but this doesn't seem to exist. |
1387 // | 1387 // |
1388 // This can't be created in the BrowserProcessImpl constructor because it | 1388 // This can't be created in the BrowserProcessImpl constructor because it |
1389 // needs to read prefs that get set after that runs. | 1389 // needs to read prefs that get set after that runs. |
1390 browser_process_->intranet_redirect_detector(); | 1390 browser_process_->intranet_redirect_detector(); |
1391 GoogleSearchCounter::RegisterForNotifications(); | 1391 GoogleSearchCounter::RegisterForNotifications(); |
1392 | 1392 |
1393 // Disable SDCH filtering if switches::kEnableSdch is 0. | 1393 // SDCH options via switches::kEnableSdch include: |
Lei Zhang
2014/01/08 19:42:23
nit: you can declare these inside the if() block b
jar (doing other things)
2014/01/08 23:46:18
+1
mef
2014/01/09 16:23:53
Done.
| |
1394 int sdch_enabled = 1; | 1394 const int kSdchDisabled = 0; |
1395 const int kSdchOverHttpEnabled = 1; | |
1396 const int kSdchOverBothHttpAndHttpsEnabled = 2; | |
1397 int sdch_enabled = kSdchOverHttpEnabled; | |
1395 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { | 1398 if (parsed_command_line().HasSwitch(switches::kEnableSdch)) { |
1396 base::StringToInt(parsed_command_line().GetSwitchValueASCII( | 1399 base::StringToInt(parsed_command_line().GetSwitchValueASCII( |
Lei Zhang
2014/01/08 19:42:23
If you care about 'imperfect conversions' as defin
mef
2014/01/09 16:23:53
Done.
| |
1397 switches::kEnableSdch), &sdch_enabled); | 1400 switches::kEnableSdch), &sdch_enabled); |
1398 if (!sdch_enabled) | 1401 if (sdch_enabled == kSdchDisabled) { |
1399 net::SdchManager::EnableSdchSupport(false); | 1402 net::SdchManager::EnableSdchSupport(false); |
1403 } else if (sdch_enabled == kSdchOverBothHttpAndHttpsEnabled) { | |
1404 net::SdchManager::EnableSecureSchemeSupport(true); | |
1405 } | |
1400 } | 1406 } |
1401 | 1407 |
1402 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) | 1408 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) |
1403 InstallJankometer(parsed_command_line()); | 1409 InstallJankometer(parsed_command_line()); |
1404 | 1410 |
1405 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 1411 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
1406 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1412 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1407 base::FilePath path = | 1413 base::FilePath path = |
1408 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1414 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1409 printing::PrintedDocument::set_debug_dump_path(path); | 1415 printing::PrintedDocument::set_debug_dump_path(path); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1691 chromeos::CrosSettings::Shutdown(); | 1697 chromeos::CrosSettings::Shutdown(); |
1692 #endif | 1698 #endif |
1693 #endif | 1699 #endif |
1694 } | 1700 } |
1695 | 1701 |
1696 // Public members: | 1702 // Public members: |
1697 | 1703 |
1698 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1704 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1699 chrome_extra_parts_.push_back(parts); | 1705 chrome_extra_parts_.push_back(parts); |
1700 } | 1706 } |
OLD | NEW |