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 #ifndef CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ | 5 #ifndef CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ |
6 #define CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ | 6 #define CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 namespace chrome { | 12 namespace chrome { |
13 | 13 |
14 class OmahaQueryParams { | 14 class OmahaQueryParams { |
15 public: | 15 public: |
16 enum ProdId { | 16 enum ProdId { |
17 CHROME = 0, | 17 CHROME = 0, |
18 CHROMECRX, | 18 CHROMECRX, |
19 CHROMIUMCRX, | 19 CHROMIUMCRX, |
20 }; | 20 }; |
21 | 21 |
22 // Generates a string of URL query paramaters to be used when getting | 22 // Generates a string of URL query paramaters to be used when getting |
23 // component and extension updates. Includes the following fields: os, arch, | 23 // component and extension updates. Includes the following fields: os, arch, |
24 // prod, prodchannel, prodversion. | 24 // prod, prodchannel, prodversion. |
25 static std::string Get(ProdId prod); | 25 static std::string Get(ProdId prod); |
26 | 26 |
| 27 // Returns the value we use for the "os=" parameter. Possible return values |
| 28 // include: "mac", "win", "android", "cros", "linux", and "openbsd". |
| 29 static const char* getOS(); |
| 30 |
| 31 // Returns the value we use for the "arch=" parameter. Possible return values |
| 32 // include: "x86", "x64", and "arm". |
| 33 static const char* getArch(); |
| 34 |
| 35 // Returns the value we use for the "nacl_arch" parameter. Note that this may |
| 36 // be different from the "arch" parameter above (e.g. one may be 32-bit and |
| 37 // the other 64-bit). Possible return values include: "x86-32", "x86-64", |
| 38 // "arm", and "mips32". |
| 39 static const char* getNaclArch(); |
| 40 |
27 private: | 41 private: |
28 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams); | 42 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams); |
29 }; | 43 }; |
30 | 44 |
31 } // namespace chrome | 45 } // namespace chrome |
32 | 46 |
33 #endif // CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ | 47 #endif // CHROME_COMMON_OMAHA_QUERY_PARAMS_H_ |
OLD | NEW |