Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // This file declares a class that contains various method related to branding. | 5 // This file declares a class that contains various method related to branding. |
| 6 | 6 |
| 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 class BrowserDistribution { | 26 class BrowserDistribution { |
| 27 public: | 27 public: |
| 28 enum Type { | 28 enum Type { |
| 29 CHROME_BROWSER, | 29 CHROME_BROWSER, |
| 30 CHROME_FRAME, | 30 CHROME_FRAME, |
| 31 CHROME_BINARIES, | 31 CHROME_BINARIES, |
| 32 CHROME_APP_HOST, | 32 CHROME_APP_HOST, |
| 33 NUM_TYPES | 33 NUM_TYPES |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 // Flags to control what to show in the UserExperiment dialog. | |
| 37 enum ToastUIflags { | |
| 38 kUninstall = 1, // Uninstall radio button. | |
| 39 kDontBugMeAsButton = 2, // Don't bug me is a button, not a radio button. | |
| 40 kWhyLink = 4, // Has the 'why I am seeing this' link. | |
| 41 kMakeDefault = 8 // Has the 'make it default' checkbox. | |
| 42 }; | |
| 43 | |
| 36 // A struct for communicating what a UserExperiment contains. In these | 44 // A struct for communicating what a UserExperiment contains. In these |
| 37 // experiments we show toasts to the user if they are inactive for a certain | 45 // experiments we show toasts to the user if they are inactive for a certain |
| 38 // amount of time. | 46 // amount of time. |
| 39 struct UserExperiment { | 47 struct UserExperiment { |
| 40 string16 prefix; // The experiment code prefix for this experiment, | 48 string16 prefix; // The experiment code prefix for this experiment, |
| 41 // also known as the 'TV' part in 'TV80'. | 49 // also known as the 'TV' part in 'TV80'. |
| 42 int flavor; // The flavor index for this experiment. | 50 int flavor; // The flavor index for this experiment. |
| 43 int heading; // The heading resource ID to use for this experiment. | 51 int heading; // The heading resource ID to use for this experiment. |
| 44 bool compact_bubble; // Whether to show the compact heading or not. | 52 int flags; // See ToastUIFlags above. |
| 53 bool make_default; // Whether to show a checkbox to make chrome default. | |
|
Finnur
2012/07/26 12:27:07
If you have the flags, why do you need the bool?
cpu_(ooo_6.6-7.5)
2012/07/27 03:06:23
Good catch. done.
| |
| 45 int control_group; // Size of the control group (in percentages). Control | 54 int control_group; // Size of the control group (in percentages). Control |
| 46 // group is the group that qualifies for the | 55 // group is the group that qualifies for the |
| 47 // experiment but does not participate. | 56 // experiment but does not participate. |
| 48 }; | 57 }; |
| 49 | 58 |
| 50 virtual ~BrowserDistribution() {} | 59 virtual ~BrowserDistribution() {} |
| 51 | 60 |
| 52 static BrowserDistribution* GetDistribution(); | 61 static BrowserDistribution* GetDistribution(); |
| 53 | 62 |
| 54 static BrowserDistribution* GetSpecificDistribution(Type type); | 63 static BrowserDistribution* GetSpecificDistribution(Type type); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 | 172 |
| 164 const Type type_; | 173 const Type type_; |
| 165 | 174 |
| 166 private: | 175 private: |
| 167 BrowserDistribution(); | 176 BrowserDistribution(); |
| 168 | 177 |
| 169 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 178 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 170 }; | 179 }; |
| 171 | 180 |
| 172 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 181 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |