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 11 matching lines...) Expand all Loading... |
22 namespace installer { | 22 namespace installer { |
23 class Product; | 23 class Product; |
24 } | 24 } |
25 | 25 |
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 NUM_TYPES | 33 NUM_TYPES |
33 }; | 34 }; |
34 | 35 |
35 // A struct for communicating what a UserExperiment contains. In these | 36 // A struct for communicating what a UserExperiment contains. In these |
36 // experiments we show toasts to the user if they are inactive for a certain | 37 // experiments we show toasts to the user if they are inactive for a certain |
37 // amount of time. | 38 // amount of time. |
38 struct UserExperiment { | 39 struct UserExperiment { |
39 string16 prefix; // The experiment code prefix for this experiment, | 40 string16 prefix; // The experiment code prefix for this experiment, |
40 // also known as the 'TV' part in 'TV80'. | 41 // also known as the 'TV' part in 'TV80'. |
41 int flavor; // The flavor index for this experiment. | 42 int flavor; // The flavor index for this experiment. |
42 int heading; // The heading resource ID to use for this experiment. | 43 int heading; // The heading resource ID to use for this experiment. |
43 bool compact_bubble; // Whether to show the compact heading or not. | 44 bool compact_bubble; // Whether to show the compact heading or not. |
44 int control_group; // Size of the control group (in percentages). Control | 45 int control_group; // Size of the control group (in percentages). Control |
45 // group is the group that qualifies for the | 46 // group is the group that qualifies for the |
46 // experiment but does not participate. | 47 // experiment but does not participate. |
47 }; | 48 }; |
48 | 49 |
49 // An array of the Types representing products; | |
50 static const Type kProductTypes[]; | |
51 | |
52 // The number of elements in the array |kProductTypes|. | |
53 static const size_t kNumProductTypes; | |
54 | |
55 virtual ~BrowserDistribution() {} | 50 virtual ~BrowserDistribution() {} |
56 | 51 |
57 static BrowserDistribution* GetDistribution(); | 52 static BrowserDistribution* GetDistribution(); |
58 | 53 |
59 static BrowserDistribution* GetSpecificDistribution(Type type); | 54 static BrowserDistribution* GetSpecificDistribution(Type type); |
60 | 55 |
61 Type GetType() const { return type_; } | 56 Type GetType() const { return type_; } |
62 | 57 |
63 virtual void DoPostUninstallOperations(const Version& version, | 58 virtual void DoPostUninstallOperations(const Version& version, |
64 const FilePath& local_data_path, | 59 const FilePath& local_data_path, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 163 |
169 const Type type_; | 164 const Type type_; |
170 | 165 |
171 private: | 166 private: |
172 BrowserDistribution(); | 167 BrowserDistribution(); |
173 | 168 |
174 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 169 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
175 }; | 170 }; |
176 | 171 |
177 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 172 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
OLD | NEW |