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/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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 max_queueing_delay_ms); | 1081 max_queueing_delay_ms); |
1082 } | 1082 } |
1083 } | 1083 } |
1084 | 1084 |
1085 void ChromeBrowserMainParts::DefaultAppsFieldTrial() { | 1085 void ChromeBrowserMainParts::DefaultAppsFieldTrial() { |
1086 std::string brand; | 1086 std::string brand; |
1087 google_util::GetBrand(&brand); | 1087 google_util::GetBrand(&brand); |
1088 | 1088 |
1089 // Create a 100% field trial based on the brand code. | 1089 // Create a 100% field trial based on the brand code. |
1090 if (LowerCaseEqualsASCII(brand, "ecdb")) { | 1090 if (LowerCaseEqualsASCII(brand, "ecdb")) { |
1091 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrial_Name, | 1091 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrialName, |
1092 kDefaultAppsTrial_NoAppsGroup); | 1092 kDefaultAppsTrialNoAppsGroup); |
1093 } else if (LowerCaseEqualsASCII(brand, "ecda")) { | 1093 } else if (LowerCaseEqualsASCII(brand, "ecda")) { |
1094 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrial_Name, | 1094 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrialName, |
1095 kDefaultAppsTrial_WithAppsGroup); | 1095 kDefaultAppsTrialWithAppsGroup); |
1096 } | 1096 } |
1097 } | 1097 } |
1098 | 1098 |
1099 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 1099 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
1100 | 1100 |
1101 // Initializes the metrics service with the configuration for this process, | 1101 // Initializes the metrics service with the configuration for this process, |
1102 // returning the created service (guaranteed non-NULL). | 1102 // returning the created service (guaranteed non-NULL). |
1103 MetricsService* ChromeBrowserMainParts::InitializeMetrics( | 1103 MetricsService* ChromeBrowserMainParts::InitializeMetrics( |
1104 const CommandLine& parsed_command_line, | 1104 const CommandLine& parsed_command_line, |
1105 const PrefService* local_state) { | 1105 const PrefService* local_state) { |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2158 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2159 (pre_read == "0" || pre_read == "1")) { | 2159 (pre_read == "0" || pre_read == "1")) { |
2160 std::string uma_name(name); | 2160 std::string uma_name(name); |
2161 uma_name += "_PreRead"; | 2161 uma_name += "_PreRead"; |
2162 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2162 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2163 AddPreReadHistogramTime(uma_name.c_str(), time); | 2163 AddPreReadHistogramTime(uma_name.c_str(), time); |
2164 } | 2164 } |
2165 #endif | 2165 #endif |
2166 #endif | 2166 #endif |
2167 } | 2167 } |
OLD | NEW |