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 // Disable SDCH filtering if switches::kEnableSdch is 0. |
jar (doing other things)
2014/01/03 18:35:13
Nit: Change comment to something more like:
// SD
mef
2014/01/03 20:26:55
Done.
| |
1394 int sdch_enabled = 1; | 1394 const int kSdchDisabled = 0; |
1395 const int kSdchEnabled = 1; | |
jar (doing other things)
2014/01/03 18:35:13
nit: kSdchOverHttpEnabled
mef
2014/01/03 20:26:55
Done.
| |
1396 const int kSdchOverSecureEnabled = 2; | |
jar (doing other things)
2014/01/03 18:35:13
nit: kSdchOverBothHttpAndHttpsEnabled
mef
2014/01/03 20:26:55
Done.
| |
1397 int sdch_enabled = kSdchEnabled; | |
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( |
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 if (sdch_enabled == kSdchOverSecureEnabled) | |
jar (doing other things)
2014/01/03 18:35:13
nit:
else if
mef
2014/01/03 20:26:55
Done.
| |
1404 net::SdchManager::EnableSdchOverSecureSupport(true); | |
1400 } | 1405 } |
1401 | 1406 |
1402 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) | 1407 if (parsed_command_line().HasSwitch(switches::kEnableWatchdog)) |
1403 InstallJankometer(parsed_command_line()); | 1408 InstallJankometer(parsed_command_line()); |
1404 | 1409 |
1405 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 1410 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
1406 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1411 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1407 base::FilePath path = | 1412 base::FilePath path = |
1408 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1413 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1409 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 Loading... | |
1691 chromeos::CrosSettings::Shutdown(); | 1696 chromeos::CrosSettings::Shutdown(); |
1692 #endif | 1697 #endif |
1693 #endif | 1698 #endif |
1694 } | 1699 } |
1695 | 1700 |
1696 // Public members: | 1701 // Public members: |
1697 | 1702 |
1698 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1703 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1699 chrome_extra_parts_.push_back(parts); | 1704 chrome_extra_parts_.push_back(parts); |
1700 } | 1705 } |
OLD | NEW |