OLD | NEW |
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 // This files declares a class that contains methods and data to conduct | 5 // This files declares a class that contains methods and data to conduct |
6 // for user expeirments. | 6 // for user expeirments. |
7 | 7 |
8 #ifndef CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ | 8 #ifndef CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ |
9 #define CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ | 9 #define CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ |
10 | 10 |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "chrome/installer/util/util_constants.h" | 12 #include "chrome/installer/util/util_constants.h" |
13 | 13 |
| 14 namespace base { |
14 class CommandLine; | 15 class CommandLine; |
15 | |
16 namespace base { | |
17 class FilePath; | 16 class FilePath; |
18 } | 17 } |
19 | 18 |
20 namespace installer { | 19 namespace installer { |
21 | 20 |
22 class Product; | 21 class Product; |
23 | 22 |
24 // Flags to control what to show in the UserExperiment dialog. | 23 // Flags to control what to show in the UserExperiment dialog. |
25 enum ToastUiFlags { | 24 enum ToastUiFlags { |
26 kToastUiUninstall = 1 << 0, // Uninstall radio button. | 25 kToastUiUninstall = 1 << 0, // Uninstall radio button. |
(...skipping 18 matching lines...) Expand all Loading... |
45 | 44 |
46 // Creates the experiment details for a given language-brand combo. | 45 // Creates the experiment details for a given language-brand combo. |
47 // If |flavor| is -1, then a flavor will be selected at random. |experiment| | 46 // If |flavor| is -1, then a flavor will be selected at random. |experiment| |
48 // is the struct you want to write the experiment information to. | 47 // is the struct you want to write the experiment information to. |
49 // Returns false if no experiment details could be gathered. | 48 // Returns false if no experiment details could be gathered. |
50 bool CreateExperimentDetails(int flavor, ExperimentDetails* experiment); | 49 bool CreateExperimentDetails(int flavor, ExperimentDetails* experiment); |
51 | 50 |
52 // After an install or upgrade the user might qualify to participate in an | 51 // After an install or upgrade the user might qualify to participate in an |
53 // experiment. This function determines if the user qualifies and if so it | 52 // experiment. This function determines if the user qualifies and if so it |
54 // sets the wheels in motion or in simple cases does the experiment itself. | 53 // sets the wheels in motion or in simple cases does the experiment itself. |
55 void LaunchBrowserUserExperiment(const CommandLine& base_command, | 54 void LaunchBrowserUserExperiment(const base::CommandLine& base_command, |
56 InstallStatus status, | 55 InstallStatus status, |
57 bool system_level); | 56 bool system_level); |
58 | 57 |
59 // The user has qualified for the inactive user toast experiment and this | 58 // The user has qualified for the inactive user toast experiment and this |
60 // function just performs it. | 59 // function just performs it. |
61 void InactiveUserToastExperiment(int flavor, | 60 void InactiveUserToastExperiment(int flavor, |
62 const base::string16& experiment_group, | 61 const base::string16& experiment_group, |
63 const Product& product, | 62 const Product& product, |
64 const base::FilePath& application_path); | 63 const base::FilePath& application_path); |
65 | 64 |
66 } // namespace installer | 65 } // namespace installer |
67 | 66 |
68 #endif // CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ | 67 #endif // CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_ |
OLD | NEW |