Add os/arch/nacl_arch to webstore install code
[chromium-blink-merge.git] / chrome / common / omaha_query_params / omaha_query_params.h
blob7f74be1237ad7464259165fc56663eac810f7ca4
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_
6 #define CHROME_COMMON_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_
8 #include <string>
10 #include "base/basictypes.h"
12 namespace chrome {
14 class OmahaQueryParams {
15 public:
16 enum ProdId {
17 CHROME = 0,
18 CRX,
21 // Generates a string of URL query paramaters to be used when getting
22 // component and extension updates. Includes the following fields: os, arch,
23 // prod, prodchannel, prodversion.
24 static std::string Get(ProdId prod);
26 // Returns the value we use for the "os=" parameter. Possible return values
27 // include: "mac", "win", "android", "cros", "linux", and "openbsd".
28 static const char* getOS();
30 // Returns the value we use for the "arch=" parameter. Possible return values
31 // include: "x86", "x64", and "arm".
32 static const char* getArch();
34 // Returns the value we use for the "nacl_arch" parameter. Note that this may
35 // be different from the "arch" parameter above (e.g. one may be 32-bit and
36 // the other 64-bit). Possible return values include: "x86-32", "x86-64",
37 // "arm", and "mips32".
38 static const char* getNaclArch();
40 private:
41 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams);
44 } // namespace chrome
46 #endif // CHROME_COMMON_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_