| 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. |
| 45 int control_group; // Size of the control group (in percentages). Control | 53 int control_group; // Size of the control group (in percentages). Control |
| 46 // group is the group that qualifies for the | 54 // group is the group that qualifies for the |
| 47 // experiment but does not participate. | 55 // experiment but does not participate. |
| 48 }; | 56 }; |
| 49 | 57 |
| 50 virtual ~BrowserDistribution() {} | 58 virtual ~BrowserDistribution() {} |
| 51 | 59 |
| 52 static BrowserDistribution* GetDistribution(); | 60 static BrowserDistribution* GetDistribution(); |
| 53 | 61 |
| 54 static BrowserDistribution* GetSpecificDistribution(Type type); | 62 static BrowserDistribution* GetSpecificDistribution(Type type); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 171 |
| 164 const Type type_; | 172 const Type type_; |
| 165 | 173 |
| 166 private: | 174 private: |
| 167 BrowserDistribution(); | 175 BrowserDistribution(); |
| 168 | 176 |
| 169 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 177 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 170 }; | 178 }; |
| 171 | 179 |
| 172 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 180 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |