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 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1367 // | 1367 // |
1368 // A simpler way of doing all this would be to have some function which could | 1368 // A simpler way of doing all this would be to have some function which could |
1369 // give the time elapsed since startup, and simply have this object check that | 1369 // give the time elapsed since startup, and simply have this object check that |
1370 // when asked to initialize itself, but this doesn't seem to exist. | 1370 // when asked to initialize itself, but this doesn't seem to exist. |
1371 // | 1371 // |
1372 // This can't be created in the BrowserProcessImpl constructor because it | 1372 // This can't be created in the BrowserProcessImpl constructor because it |
1373 // needs to read prefs that get set after that runs. | 1373 // needs to read prefs that get set after that runs. |
1374 browser_process_->intranet_redirect_detector(); | 1374 browser_process_->intranet_redirect_detector(); |
1375 GoogleSearchCounter::RegisterForNotifications(); | 1375 GoogleSearchCounter::RegisterForNotifications(); |
1376 | 1376 |
1377 if (parsed_command_line().HasSwitch(switches::kEnableSdchOverHttps)) { | 1377 { |
mef
2014/09/23 08:06:32
is empty block needed here? I don't see them elsew
Randy Smith (Not in Mondays)
2014/09/23 21:44:43
Done.
| |
1378 net::SdchManager::EnableSecureSchemeSupport(true); | 1378 // Check SDCH field trial, primary to allow disabling of HTTPS |
1379 } else { | 1379 // if necessary, now that it's enabled by default. |
1380 // Check SDCH field trial. | |
1381 const char kSdchFieldTrialName[] = "SDCH"; | 1380 const char kSdchFieldTrialName[] = "SDCH"; |
1382 const char kEnabledAllGroupName[] = "EnabledAll"; | 1381 const char kEnabledAllGroupName[] = "EnabledAll"; |
1383 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly"; | 1382 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly"; |
1384 const char kDisabledAllGroupName[] = "DisabledAll"; | 1383 const char kDisabledAllGroupName[] = "DisabledAll"; |
1384 const char kDisabledHttps[] = "DisabledHttps"; | |
1385 | 1385 |
1386 // Store in a string on return to keep underlying storage for | 1386 // Store in a string on return to keep underlying storage for |
1387 // StringPiece stable. | 1387 // StringPiece stable. |
1388 std::string sdch_trial_group_string = | 1388 std::string sdch_trial_group_string = |
1389 base::FieldTrialList::FindFullName(kSdchFieldTrialName); | 1389 base::FieldTrialList::FindFullName(kSdchFieldTrialName); |
1390 base::StringPiece sdch_trial_group(sdch_trial_group_string); | 1390 base::StringPiece sdch_trial_group(sdch_trial_group_string); |
1391 if (sdch_trial_group.starts_with(kEnabledAllGroupName)) { | 1391 if (sdch_trial_group.starts_with(kEnabledAllGroupName)) { |
mef
2014/09/23 08:06:32
Is kEnabledAllGroupName still needed?
Randy Smith (Not in Mondays)
2014/09/23 21:44:43
Done.
| |
1392 net::SdchManager::EnableSecureSchemeSupport(true); | 1392 net::SdchManager::EnableSecureSchemeSupport(true); |
1393 net::SdchManager::EnableSdchSupport(true); | 1393 net::SdchManager::EnableSdchSupport(true); |
1394 } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { | 1394 } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { |
mef
2014/09/23 08:06:32
This is essentially "kDisabledHttps", right? Then
Randy Smith (Not in Mondays)
2014/09/23 21:44:43
Yeah, you're right. That's probably the right way
| |
1395 net::SdchManager::EnableSdchSupport(true); | 1395 net::SdchManager::EnableSdchSupport(true); |
1396 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { | 1396 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { |
1397 net::SdchManager::EnableSdchSupport(false); | 1397 net::SdchManager::EnableSdchSupport(false); |
1398 } else if (sdch_trial_group.starts_with(kDisabledHttps)) { | |
1399 net::SdchManager::EnableSecureSchemeSupport(false); | |
1400 net::SdchManager::EnableSdchSupport(true); | |
1398 } | 1401 } |
1399 } | 1402 } |
1400 | 1403 |
1401 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) | 1404 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) |
1402 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1405 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1403 base::FilePath path = | 1406 base::FilePath path = |
1404 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1407 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1405 printing::PrintedDocument::set_debug_dump_path(path); | 1408 printing::PrintedDocument::set_debug_dump_path(path); |
1406 } | 1409 } |
1407 #endif | 1410 #endif |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1680 chromeos::CrosSettings::Shutdown(); | 1683 chromeos::CrosSettings::Shutdown(); |
1681 #endif | 1684 #endif |
1682 #endif | 1685 #endif |
1683 } | 1686 } |
1684 | 1687 |
1685 // Public members: | 1688 // Public members: |
1686 | 1689 |
1687 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1690 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1688 chrome_extra_parts_.push_back(parts); | 1691 chrome_extra_parts_.push_back(parts); |
1689 } | 1692 } |
OLD | NEW |