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 // Check SDCH field trial. Default is now that everything is enabled, |
1378 net::SdchManager::EnableSecureSchemeSupport(true); | 1378 // so provide options for disabling HTTPS or all of SDCH. |
1379 } else { | 1379 const char kSdchFieldTrialName[] = "SDCH"; |
1380 // Check SDCH field trial. | 1380 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly"; |
1381 const char kSdchFieldTrialName[] = "SDCH"; | 1381 const char kDisabledAllGroupName[] = "DisabledAll"; |
1382 const char kEnabledAllGroupName[] = "EnabledAll"; | |
1383 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly"; | |
1384 const char kDisabledAllGroupName[] = "DisabledAll"; | |
1385 | 1382 |
1386 // Store in a string on return to keep underlying storage for | 1383 // Store in a string on return to keep underlying storage for |
1387 // StringPiece stable. | 1384 // StringPiece stable. |
1388 std::string sdch_trial_group_string = | 1385 std::string sdch_trial_group_string = |
1389 base::FieldTrialList::FindFullName(kSdchFieldTrialName); | 1386 base::FieldTrialList::FindFullName(kSdchFieldTrialName); |
1390 base::StringPiece sdch_trial_group(sdch_trial_group_string); | 1387 base::StringPiece sdch_trial_group(sdch_trial_group_string); |
1391 if (sdch_trial_group.starts_with(kEnabledAllGroupName)) { | 1388 if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { |
1392 net::SdchManager::EnableSecureSchemeSupport(true); | 1389 net::SdchManager::EnableSdchSupport(true); |
1393 net::SdchManager::EnableSdchSupport(true); | 1390 net::SdchManager::EnableSecureSchemeSupport(false); |
1394 } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { | 1391 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { |
1395 net::SdchManager::EnableSdchSupport(true); | 1392 net::SdchManager::EnableSdchSupport(false); |
1396 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { | |
1397 net::SdchManager::EnableSdchSupport(false); | |
1398 } | |
1399 } | 1393 } |
1400 | 1394 |
1401 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) | 1395 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) |
1402 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1396 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1403 base::FilePath path = | 1397 base::FilePath path = |
1404 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1398 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1405 printing::PrintedDocument::set_debug_dump_path(path); | 1399 printing::PrintedDocument::set_debug_dump_path(path); |
1406 } | 1400 } |
1407 #endif | 1401 #endif |
1408 | 1402 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 chromeos::CrosSettings::Shutdown(); | 1674 chromeos::CrosSettings::Shutdown(); |
1681 #endif | 1675 #endif |
1682 #endif | 1676 #endif |
1683 } | 1677 } |
1684 | 1678 |
1685 // Public members: | 1679 // Public members: |
1686 | 1680 |
1687 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1681 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1688 chrome_extra_parts_.push_back(parts); | 1682 chrome_extra_parts_.push_back(parts); |
1689 } | 1683 } |
OLD | NEW |