Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/omaha_query_params/omaha_query_params.h

Issue 153273002: Include the language (locale) info in the update ping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move "lang" param to OmahaQueryParams Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_OMAHA_QUERY_PARAMS_H_ 5 #ifndef CHROME_BROWSER_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_
6 #define CHROME_COMMON_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_ 6 #define CHROME_BROWSER_OMAHA_QUERY_PARAMS_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 CRX, 18 CRX,
19 }; 19 };
20 20
21 // Generates a string of URL query paramaters to be used when getting 21 // Generates a string of URL query paramaters to be used when getting
22 // component and extension updates. Includes the following fields: os, arch, 22 // component and extension updates. Includes the following fields: os, arch,
23 // prod, prodchannel, prodversion. 23 // prod, prodchannel, prodversion.
Sorin Jianu 2014/02/13 19:06:55 The comment must be updated to include the lang fi
Devlin 2014/02/14 00:26:42 Done.
24 static std::string Get(ProdId prod); 24 static std::string Get(ProdId prod);
Sorin Jianu 2014/02/13 19:06:55 I noticed this module does not have unit tests. Wo
Devlin 2014/02/14 00:26:42 Done.
25 25
26 // Returns the value we use for the "prod=" parameter. Possible return values 26 // Returns the value we use for the "prod=" parameter. Possible return values
27 // include "chrome", "chromecrx", "chromiumcrx", and "unknown". 27 // include "chrome", "chromecrx", "chromiumcrx", and "unknown".
28 static const char* GetProdIdString(chrome::OmahaQueryParams::ProdId prod); 28 static const char* GetProdIdString(chrome::OmahaQueryParams::ProdId prod);
29 29
30 // Returns the value we use for the "os=" parameter. Possible return values 30 // Returns the value we use for the "os=" parameter. Possible return values
31 // include: "mac", "win", "android", "cros", "linux", and "openbsd". 31 // include: "mac", "win", "android", "cros", "linux", and "openbsd".
32 static const char* getOS(); 32 static const char* getOS();
33 33
34 // Returns the value we use for the "arch=" parameter. Possible return values 34 // Returns the value we use for the "arch=" parameter. Possible return values
35 // include: "x86", "x64", and "arm". 35 // include: "x86", "x64", and "arm".
36 static const char* getArch(); 36 static const char* getArch();
37 37
38 // Returns the value we use for the "nacl_arch" parameter. Note that this may 38 // Returns the value we use for the "nacl_arch" parameter. Note that this may
39 // be different from the "arch" parameter above (e.g. one may be 32-bit and 39 // be different from the "arch" parameter above (e.g. one may be 32-bit and
40 // the other 64-bit). Possible return values include: "x86-32", "x86-64", 40 // the other 64-bit). Possible return values include: "x86-32", "x86-64",
41 // "arm", and "mips32". 41 // "arm", and "mips32".
42 static const char* getNaclArch(); 42 static const char* getNaclArch();
43 43
44 // Returns the value we use for the "updaterchannel=" and "prodchannel=" 44 // Returns the value we use for the "updaterchannel=" and "prodchannel="
45 // parameters. Possible return values include: "canary", "dev", "beta", and 45 // parameters. Possible return values include: "canary", "dev", "beta", and
46 // "stable". 46 // "stable".
47 static const char* GetChannelString(); 47 static const char* GetChannelString();
48 48
49 // Returns the language for the present locale. Possible return values are
50 // standard tags for languages, such as "en", "en-US", "de", "fr", "af", etc.
51 static const char* GetLang();
52
49 private: 53 private:
50 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams); 54 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams);
51 }; 55 };
52 56
53 } // namespace chrome 57 } // namespace chrome
54 58
55 #endif // CHROME_COMMON_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_ 59 #endif // CHROME_BROWSER_OMAHA_QUERY_PARAMS_OMAHA_QUERY_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698