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

Side by Side Diff: chrome/installer/util/user_experiment.cc

Issue 1148173002: Remove dependency on resources from installer_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ix non-Windows gn check Created 5 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/installer/util/user_experiment.h" 5 #include "chrome/installer/util/user_experiment.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <sddl.h> 8 #include <sddl.h>
9 #include <wtsapi32.h> 9 #include <wtsapi32.h>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/process/launch.h" 15 #include "base/process/launch.h"
16 #include "base/rand_util.h" 16 #include "base/rand_util.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_split.h" 18 #include "base/strings/string_split.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/win/scoped_handle.h" 21 #include "base/win/scoped_handle.h"
22 #include "base/win/windows_version.h" 22 #include "base/win/windows_version.h"
23 #include "chrome/common/attrition_experiments.h"
24 #include "chrome/common/chrome_paths.h" 23 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/chrome_result_codes.h" 24 #include "chrome/common/chrome_result_codes.h"
26 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/grit/chromium_strings.h"
27 #include "chrome/installer/util/browser_distribution.h" 27 #include "chrome/installer/util/browser_distribution.h"
28 #include "chrome/installer/util/google_update_constants.h" 28 #include "chrome/installer/util/google_update_constants.h"
29 #include "chrome/installer/util/google_update_settings.h" 29 #include "chrome/installer/util/google_update_settings.h"
30 #include "chrome/installer/util/helper.h" 30 #include "chrome/installer/util/helper.h"
31 #include "chrome/installer/util/install_util.h" 31 #include "chrome/installer/util/install_util.h"
32 #include "chrome/installer/util/product.h" 32 #include "chrome/installer/util/product.h"
33 #include "content/public/common/result_codes.h" 33 #include "content/public/common/result_codes.h"
34 34
35 #pragma comment(lib, "wtsapi32.lib") 35 #pragma comment(lib, "wtsapi32.lib")
36 36
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // The experiment in 2011 used PIxx codes. 299 // The experiment in 2011 used PIxx codes.
300 // 300 //
301 // Inactive user toast experiment: 301 // Inactive user toast experiment:
302 // The experiment in Dec 2009 used TGxx and THxx. 302 // The experiment in Dec 2009 used TGxx and THxx.
303 // The experiment in Feb 2010 used TKxx and TLxx. 303 // The experiment in Feb 2010 used TKxx and TLxx.
304 // The experiment in Apr 2010 used TMxx and TNxx. 304 // The experiment in Apr 2010 used TMxx and TNxx.
305 // The experiment in Oct 2010 used TVxx TWxx TXxx TYxx. 305 // The experiment in Oct 2010 used TVxx TWxx TXxx TYxx.
306 // The experiment in Feb 2011 used SJxx SKxx SLxx SMxx. 306 // The experiment in Feb 2011 used SJxx SKxx SLxx SMxx.
307 // The experiment in Mar 2012 used ZAxx ZBxx ZCxx. 307 // The experiment in Mar 2012 used ZAxx ZBxx ZCxx.
308 // The experiment in Jan 2013 uses DAxx. 308 // The experiment in Jan 2013 uses DAxx.
309 using namespace attrition_experiments;
310 309
311 static const struct UserExperimentSpecs { 310 static const struct UserExperimentSpecs {
312 const wchar_t* locale; // Locale to show this experiment for (* for all). 311 const wchar_t* locale; // Locale to show this experiment for (* for all).
313 const wchar_t* brands; // Brand codes show this experiment for (* for all). 312 const wchar_t* brands; // Brand codes show this experiment for (* for all).
314 int control_group; // Size of the control group, in percentages. 313 int control_group; // Size of the control group, in percentages.
315 const wchar_t* prefix; // The two letter experiment code. The second letter 314 const wchar_t* prefix; // The two letter experiment code. The second letter
316 // will be incremented with the flavor. 315 // will be incremented with the flavor.
317 FlavorDetails flavors[kMax]; 316 FlavorDetails flavors[kMax];
318 } kExperiments[] = { 317 } kExperiments[] = {
319 // The first match from top to bottom is used so this list should be ordered 318 // The first match from top to bottom is used so this list should be ordered
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // running. 529 // running.
531 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch( 530 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch(
532 switches::kSystemLevelToast); 531 switches::kSystemLevelToast);
533 532
534 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd( 533 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd(
535 system_level_toast, product.distribution()->GetType())); 534 system_level_toast, product.distribution()->GetType()));
536 base::LaunchProcess(cmd, base::LaunchOptions()); 535 base::LaunchProcess(cmd, base::LaunchOptions());
537 } 536 }
538 537
539 } // namespace installer 538 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698