OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 30)); | 496 30)); |
497 const int connect_backup_jobs_enabled = trial->kDefaultGroupNumber; | 497 const int connect_backup_jobs_enabled = trial->kDefaultGroupNumber; |
498 trial->AppendGroup("ConnectBackupJobsDisabled", | 498 trial->AppendGroup("ConnectBackupJobsDisabled", |
499 kConnectBackupJobsProbability); | 499 kConnectBackupJobsProbability); |
500 const int trial_group = trial->group(); | 500 const int trial_group = trial->group(); |
501 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( | 501 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( |
502 trial_group == connect_backup_jobs_enabled); | 502 trial_group == connect_backup_jobs_enabled); |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
| 506 void BrowserMainParts::RevocationCheckingDisabledFieldTrial() { |
| 507 const base::FieldTrial::Probability kDivisor = 100; |
| 508 base::FieldTrial::Probability probability = 50; // 50/50 trial |
| 509 |
| 510 // After August 30, 2011 builds, it will always be in default group. |
| 511 scoped_refptr<base::FieldTrial> trial( |
| 512 new base::FieldTrial( |
| 513 "RevCheckingImpact", kDivisor, "control", 2011, 8, 30)); |
| 514 |
| 515 int disabled_group = trial->AppendGroup( |
| 516 "disabled", probability); |
| 517 |
| 518 int trial_grp = trial->group(); |
| 519 if (trial_grp == disabled_group) |
| 520 net::SSLConfigService::DisableRevCheckingForPinnedSites(); |
| 521 } |
| 522 |
506 // BrowserMainParts: |MainMessageLoopStart()| and related ---------------------- | 523 // BrowserMainParts: |MainMessageLoopStart()| and related ---------------------- |
507 | 524 |
508 void BrowserMainParts::MainMessageLoopStart() { | 525 void BrowserMainParts::MainMessageLoopStart() { |
509 PreMainMessageLoopStart(); | 526 PreMainMessageLoopStart(); |
510 | 527 |
511 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 528 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); |
512 | 529 |
513 // TODO(viettrungluu): should these really go before setting the thread name? | 530 // TODO(viettrungluu): should these really go before setting the thread name? |
514 system_monitor_.reset(new base::SystemMonitor); | 531 system_monitor_.reset(new base::SystemMonitor); |
515 hi_res_timer_manager_.reset(new HighResolutionTimerManager); | 532 hi_res_timer_manager_.reset(new HighResolutionTimerManager); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start(); | 603 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start(); |
587 | 604 |
588 // Note: make sure to call ConnectionFieldTrial() before | 605 // Note: make sure to call ConnectionFieldTrial() before |
589 // ProxyConnectionsFieldTrial(). | 606 // ProxyConnectionsFieldTrial(). |
590 ConnectionFieldTrial(); | 607 ConnectionFieldTrial(); |
591 SocketTimeoutFieldTrial(); | 608 SocketTimeoutFieldTrial(); |
592 ProxyConnectionsFieldTrial(); | 609 ProxyConnectionsFieldTrial(); |
593 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); | 610 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); |
594 SpdyFieldTrial(); | 611 SpdyFieldTrial(); |
595 ConnectBackupJobsFieldTrial(); | 612 ConnectBackupJobsFieldTrial(); |
| 613 RevocationCheckingDisabledFieldTrial(); |
596 } | 614 } |
597 | 615 |
598 // ----------------------------------------------------------------------------- | 616 // ----------------------------------------------------------------------------- |
599 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure | 617 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure |
600 | 618 |
601 namespace { | 619 namespace { |
602 | 620 |
603 // This function provides some ways to test crash and assertion handling | 621 // This function provides some ways to test crash and assertion handling |
604 // behavior of the program. | 622 // behavior of the program. |
605 void HandleTestParameters(const CommandLine& command_line) { | 623 void HandleTestParameters(const CommandLine& command_line) { |
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 #if defined(OS_CHROMEOS) | 1988 #if defined(OS_CHROMEOS) |
1971 // To be precise, logout (browser shutdown) is not yet done, but the | 1989 // To be precise, logout (browser shutdown) is not yet done, but the |
1972 // remaining work is negligible, hence we say LogoutDone here. | 1990 // remaining work is negligible, hence we say LogoutDone here. |
1973 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1991 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1974 false); | 1992 false); |
1975 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1993 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1976 #endif | 1994 #endif |
1977 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1995 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
1978 return result_code; | 1996 return result_code; |
1979 } | 1997 } |
OLD | NEW |