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

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

Issue 7027040: Implement A/B experiment for anti-DDoS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Extend trial cut-off date to July 23rd. 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
« no previous file with comments | « base/metrics/field_trial.cc ('k') | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( 482 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(
483 true); 483 true);
484 } else if (parsed_command_line().HasSwitch( 484 } else if (parsed_command_line().HasSwitch(
485 switches::kDisableConnectBackupJobs)) { 485 switches::kDisableConnectBackupJobs)) {
486 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( 486 net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(
487 false); 487 false);
488 } else { 488 } else {
489 const base::FieldTrial::Probability kConnectBackupJobsDivisor = 100; 489 const base::FieldTrial::Probability kConnectBackupJobsDivisor = 100;
490 // 1% probability. 490 // 1% probability.
491 const base::FieldTrial::Probability kConnectBackupJobsProbability = 1; 491 const base::FieldTrial::Probability kConnectBackupJobsProbability = 1;
492 // After June 30, 2011 builds, it will always be in defaut group. 492 // After June 30, 2011 builds, it will always be in default group.
493 scoped_refptr<base::FieldTrial> trial( 493 scoped_refptr<base::FieldTrial> trial(
494 new base::FieldTrial("ConnnectBackupJobs", 494 new base::FieldTrial("ConnnectBackupJobs",
495 kConnectBackupJobsDivisor, "ConnectBackupJobsEnabled", 2011, 6, 495 kConnectBackupJobsDivisor, "ConnectBackupJobsEnabled", 2011, 6,
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);
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 #if defined(OS_CHROMEOS) 2003 #if defined(OS_CHROMEOS)
2004 // To be precise, logout (browser shutdown) is not yet done, but the 2004 // To be precise, logout (browser shutdown) is not yet done, but the
2005 // remaining work is negligible, hence we say LogoutDone here. 2005 // remaining work is negligible, hence we say LogoutDone here.
2006 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 2006 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
2007 false); 2007 false);
2008 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 2008 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
2009 #endif 2009 #endif
2010 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 2010 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
2011 return result_code; 2011 return result_code;
2012 } 2012 }
OLDNEW
« no previous file with comments | « base/metrics/field_trial.cc ('k') | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698