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

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

Issue 8969024: Make sure the Autolaunch infobar... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrialName, 1112 base::FieldTrialList::CreateFieldTrial(kDefaultAppsTrialName,
1113 kDefaultAppsTrialWithAppsGroup); 1113 kDefaultAppsTrialWithAppsGroup);
1114 } 1114 }
1115 } 1115 }
1116 1116
1117 void ChromeBrowserMainParts::AutoLaunchChromeFieldTrial() { 1117 void ChromeBrowserMainParts::AutoLaunchChromeFieldTrial() {
1118 std::string brand; 1118 std::string brand;
1119 google_util::GetBrand(&brand); 1119 google_util::GetBrand(&brand);
1120 1120
1121 // Create a 100% field trial based on the brand code. 1121 // Create a 100% field trial based on the brand code.
1122 if (LowerCaseEqualsASCII(brand, "rngp")) { 1122 if (auto_launch_trial::IsInExperimentGroup(brand)) {
1123 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, 1123 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
1124 kAutoLaunchTrialAutoLaunchGroup); 1124 kAutoLaunchTrialAutoLaunchGroup);
1125 } else if (LowerCaseEqualsASCII(brand, "rngq")) { 1125 } else if (auto_launch_trial::IsInControlGroup(brand)) {
1126 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, 1126 base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName,
1127 kAutoLaunchTrialControlGroup); 1127 kAutoLaunchTrialControlGroup);
1128 } 1128 }
1129 } 1129 }
1130 1130
1131 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- 1131 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related --------------
1132 1132
1133 // Initializes the metrics service with the configuration for this process, 1133 // Initializes the metrics service with the configuration for this process,
1134 // returning the created service (guaranteed non-NULL). 1134 // returning the created service (guaranteed non-NULL).
1135 MetricsService* ChromeBrowserMainParts::InitializeMetrics( 1135 MetricsService* ChromeBrowserMainParts::InitializeMetrics(
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2196 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2197 (pre_read == "0" || pre_read == "1")) { 2197 (pre_read == "0" || pre_read == "1")) {
2198 std::string uma_name(name); 2198 std::string uma_name(name);
2199 uma_name += "_PreRead"; 2199 uma_name += "_PreRead";
2200 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2200 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2201 AddPreReadHistogramTime(uma_name.c_str(), time); 2201 AddPreReadHistogramTime(uma_name.c_str(), time);
2202 } 2202 }
2203 #endif 2203 #endif
2204 #endif 2204 #endif
2205 } 2205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698