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

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

Issue 10544015: Revert "Add field trial for domain bound certificates." The field trial is done. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | « chrome/browser/chrome_browser_main.h ('k') | net/base/ssl_config_service.h » ('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) 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #include "content/public/browser/render_process_host.h" 104 #include "content/public/browser/render_process_host.h"
105 #include "content/public/common/content_client.h" 105 #include "content/public/common/content_client.h"
106 #include "content/public/common/main_function_params.h" 106 #include "content/public/common/main_function_params.h"
107 #include "grit/app_locale_settings.h" 107 #include "grit/app_locale_settings.h"
108 #include "grit/browser_resources.h" 108 #include "grit/browser_resources.h"
109 #include "grit/chromium_strings.h" 109 #include "grit/chromium_strings.h"
110 #include "grit/generated_resources.h" 110 #include "grit/generated_resources.h"
111 #include "grit/platform_locale_settings.h" 111 #include "grit/platform_locale_settings.h"
112 #include "net/base/net_module.h" 112 #include "net/base/net_module.h"
113 #include "net/base/sdch_manager.h" 113 #include "net/base/sdch_manager.h"
114 #include "net/base/ssl_config_service.h"
115 #include "net/cookies/cookie_monster.h" 114 #include "net/cookies/cookie_monster.h"
116 #include "net/http/http_basic_stream.h" 115 #include "net/http/http_basic_stream.h"
117 #include "net/http/http_network_layer.h" 116 #include "net/http/http_network_layer.h"
118 #include "net/http/http_stream_factory.h" 117 #include "net/http/http_stream_factory.h"
119 #include "net/socket/client_socket_pool_base.h" 118 #include "net/socket/client_socket_pool_base.h"
120 #include "net/socket/client_socket_pool_manager.h" 119 #include "net/socket/client_socket_pool_manager.h"
121 #include "net/spdy/spdy_session.h" 120 #include "net/spdy/spdy_session.h"
122 #include "net/spdy/spdy_session_pool.h" 121 #include "net/spdy/spdy_session_pool.h"
123 #include "net/url_request/url_request.h" 122 #include "net/url_request/url_request.h"
124 #include "net/websockets/websocket_job.h" 123 #include "net/websockets/websocket_job.h"
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 // Create a 100% field trial based on the brand code. 1005 // Create a 100% field trial based on the brand code.
1007 if (auto_launch_trial::IsInExperimentGroup(brand)) { 1006 if (auto_launch_trial::IsInExperimentGroup(brand)) {
1008 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, 1007 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
1009 kAutoLaunchTrialAutoLaunchGroup); 1008 kAutoLaunchTrialAutoLaunchGroup);
1010 } else if (auto_launch_trial::IsInControlGroup(brand)) { 1009 } else if (auto_launch_trial::IsInControlGroup(brand)) {
1011 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, 1010 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
1012 kAutoLaunchTrialControlGroup); 1011 kAutoLaunchTrialControlGroup);
1013 } 1012 }
1014 } 1013 }
1015 1014
1016 void ChromeBrowserMainParts::DomainBoundCertsFieldTrial() {
1017 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
1018 if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
1019 net::SSLConfigService::EnableDomainBoundCertsTrial();
1020 } else if (channel == chrome::VersionInfo::CHANNEL_DEV &&
1021 base::FieldTrialList::IsOneTimeRandomizationEnabled()) {
1022 const base::FieldTrial::Probability kDivisor = 100;
1023 // 10% probability of being in the enabled group.
1024 const base::FieldTrial::Probability kEnableProbability = 10;
1025 scoped_refptr<base::FieldTrial> trial =
1026 base::FieldTrialList::FactoryGetFieldTrial(
1027 "DomainBoundCerts", kDivisor, "disable", 2012, 5, 31, NULL);
1028 trial->UseOneTimeRandomization();
1029 int enable_group = trial->AppendGroup("enable", kEnableProbability);
1030 if (trial->group() == enable_group)
1031 net::SSLConfigService::EnableDomainBoundCertsTrial();
1032 }
1033 }
1034
1035 void ChromeBrowserMainParts::SetupUniformityFieldTrials() { 1015 void ChromeBrowserMainParts::SetupUniformityFieldTrials() {
1036 // One field trial will be created for each entry in this array. The i'th 1016 // One field trial will be created for each entry in this array. The i'th
1037 // field trial will have |trial_sizes[i]| groups in it, including the default 1017 // field trial will have |trial_sizes[i]| groups in it, including the default
1038 // group. Each group will have a probability of 1/|trial_sizes[i]|. 1018 // group. Each group will have a probability of 1/|trial_sizes[i]|.
1039 const int trial_sizes[] = { 100, 20, 10, 5, 2 }; 1019 const int trial_sizes[] = { 100, 20, 10, 5, 2 };
1040 1020
1041 // Declare our variation ID bases along side this array so we can loop over it 1021 // Declare our variation ID bases along side this array so we can loop over it
1042 // and assign the IDs appropriately. So for example, the 1 percent experiments 1022 // and assign the IDs appropriately. So for example, the 1 percent experiments
1043 // should have a size of 100 (100/100 = 1). 1023 // should have a size of 100 (100/100 = 1).
1044 const chrome_variations::ID trial_base_ids[] = { 1024 const chrome_variations::ID trial_base_ids[] = {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 // shoud not be performed. 1076 // shoud not be performed.
1097 if (!proxy_policy_is_set) 1077 if (!proxy_policy_is_set)
1098 ProxyConnectionsFieldTrial(); 1078 ProxyConnectionsFieldTrial();
1099 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); 1079 prerender::ConfigurePrefetchAndPrerender(parsed_command_line());
1100 SpdyFieldTrial(); 1080 SpdyFieldTrial();
1101 ConnectBackupJobsFieldTrial(); 1081 ConnectBackupJobsFieldTrial();
1102 WarmConnectionFieldTrial(); 1082 WarmConnectionFieldTrial();
1103 PredictorFieldTrial(); 1083 PredictorFieldTrial();
1104 DefaultAppsFieldTrial(); 1084 DefaultAppsFieldTrial();
1105 AutoLaunchChromeFieldTrial(); 1085 AutoLaunchChromeFieldTrial();
1106 DomainBoundCertsFieldTrial();
1107 gpu_util::InitializeForceCompositingModeFieldTrial(); 1086 gpu_util::InitializeForceCompositingModeFieldTrial();
1108 SetupUniformityFieldTrials(); 1087 SetupUniformityFieldTrials();
1109 AutocompleteFieldTrial::Activate(); 1088 AutocompleteFieldTrial::Activate();
1110 } 1089 }
1111 1090
1112 void ChromeBrowserMainParts::StartMetricsRecording() { 1091 void ChromeBrowserMainParts::StartMetricsRecording() {
1113 MetricsService* metrics = g_browser_process->metrics_service(); 1092 MetricsService* metrics = g_browser_process->metrics_service();
1114 if (parsed_command_line_.HasSwitch(switches::kMetricsRecordingOnly) || 1093 if (parsed_command_line_.HasSwitch(switches::kMetricsRecordingOnly) ||
1115 parsed_command_line_.HasSwitch(switches::kEnableBenchmarking)) { 1094 parsed_command_line_.HasSwitch(switches::kEnableBenchmarking)) {
1116 // If we're testing then we don't care what the user preference is, we turn 1095 // If we're testing then we don't care what the user preference is, we turn
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 if (base::win::GetVersion() <= base::win::VERSION_XP) 2013 if (base::win::GetVersion() <= base::win::VERSION_XP)
2035 uma_name += "_XP"; 2014 uma_name += "_XP";
2036 2015
2037 uma_name += "_PreRead_"; 2016 uma_name += "_PreRead_";
2038 uma_name += pre_read_percentage; 2017 uma_name += pre_read_percentage;
2039 AddPreReadHistogramTime(uma_name.c_str(), time); 2018 AddPreReadHistogramTime(uma_name.c_str(), time);
2040 } 2019 }
2041 #endif 2020 #endif
2042 #endif 2021 #endif
2043 } 2022 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | net/base/ssl_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698