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