Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 7113008: Add revocation checking field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 30)); 495 30));
496 const int connect_backup_jobs_enabled = trial->kDefaultGroupNumber; 496 const int connect_backup_jobs_enabled = trial->kDefaultGroupNumber;
497 trial->AppendGroup("ConnectBackupJobsDisabled", 497 trial->AppendGroup("ConnectBackupJobsDisabled",
498 kConnectBackupJobsProbability); 498 kConnectBackupJobsProbability);
499 const int trial_group = trial->group(); 499 const int trial_group = trial->group();
500 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( 500 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(
501 trial_group == connect_backup_jobs_enabled); 501 trial_group == connect_backup_jobs_enabled);
502 } 502 }
503 } 503 }
504 504
505 void BrowserMainParts::RevocationCheckingDisabledFieldTrial() {
506 const base::FieldTrial::Probability kDivisor = 100;
507 base::FieldTrial::Probability probability = 50; // 50/50 trial
508
509 // After August 30, 2011 builds, it will always be in default group.
510 scoped_refptr<base::FieldTrial> trial(
511 new base::FieldTrial(
512 "RevCheckingImpact", kDivisor, "RevChecking_control", 2011, 8, 30));
Mike Belshe 2011/06/08 04:50:38 nit: change "RevChecking_control" to "_control"?
agl 2011/06/08 18:57:12 Have changed to "control" since none of the other
513
514 int disabled_group = trial->AppendGroup(
515 "RevChecking_disabled_for_pinned_sites", probability);
Mike Belshe 2011/06/08 04:50:38 nit: change to "_disabled"
agl 2011/06/08 18:57:12 Done (with the same remark about the leading under
516
517 int trial_grp = trial->group();
518 if (trial_grp == disabled_group)
519 net::SSLConfigService::DisableRevCheckingForPinnedSites();
520 }
521
505 // BrowserMainParts: |MainMessageLoopStart()| and related ---------------------- 522 // BrowserMainParts: |MainMessageLoopStart()| and related ----------------------
506 523
507 void BrowserMainParts::MainMessageLoopStart() { 524 void BrowserMainParts::MainMessageLoopStart() {
508 PreMainMessageLoopStart(); 525 PreMainMessageLoopStart();
509 526
510 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); 527 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
511 528
512 // TODO(viettrungluu): should these really go before setting the thread name? 529 // TODO(viettrungluu): should these really go before setting the thread name?
513 system_monitor_.reset(new base::SystemMonitor); 530 system_monitor_.reset(new base::SystemMonitor);
514 hi_res_timer_manager_.reset(new HighResolutionTimerManager); 531 hi_res_timer_manager_.reset(new HighResolutionTimerManager);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start(); 602 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start();
586 603
587 // Note: make sure to call ConnectionFieldTrial() before 604 // Note: make sure to call ConnectionFieldTrial() before
588 // ProxyConnectionsFieldTrial(). 605 // ProxyConnectionsFieldTrial().
589 ConnectionFieldTrial(); 606 ConnectionFieldTrial();
590 SocketTimeoutFieldTrial(); 607 SocketTimeoutFieldTrial();
591 ProxyConnectionsFieldTrial(); 608 ProxyConnectionsFieldTrial();
592 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); 609 prerender::ConfigurePrefetchAndPrerender(parsed_command_line());
593 SpdyFieldTrial(); 610 SpdyFieldTrial();
594 ConnectBackupJobsFieldTrial(); 611 ConnectBackupJobsFieldTrial();
612 RevocationCheckingDisabledFieldTrial();
595 } 613 }
596 614
597 // ----------------------------------------------------------------------------- 615 // -----------------------------------------------------------------------------
598 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure 616 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure
599 617
600 namespace { 618 namespace {
601 619
602 // This function provides some ways to test crash and assertion handling 620 // This function provides some ways to test crash and assertion handling
603 // behavior of the program. 621 // behavior of the program.
604 void HandleTestParameters(const CommandLine& command_line) { 622 void HandleTestParameters(const CommandLine& command_line) {
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 #if defined(OS_CHROMEOS) 1986 #if defined(OS_CHROMEOS)
1969 // To be precise, logout (browser shutdown) is not yet done, but the 1987 // To be precise, logout (browser shutdown) is not yet done, but the
1970 // remaining work is negligible, hence we say LogoutDone here. 1988 // remaining work is negligible, hence we say LogoutDone here.
1971 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1989 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1972 false); 1990 false);
1973 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1991 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1974 #endif 1992 #endif
1975 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 1993 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
1976 return result_code; 1994 return result_code;
1977 } 1995 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698