| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_OMAHA_CLIENT_OMAHA_QUERY_PARAMS_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_H_ |
| 6 #define COMPONENTS_OMAHA_CLIENT_OMAHA_QUERY_PARAMS_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_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 omaha_client { | 12 namespace update_client { |
| 13 | 13 |
| 14 class OmahaQueryParamsDelegate; | 14 class UpdateQueryParamsDelegate; |
| 15 | 15 |
| 16 // Generates a string of URL query parameters to be used when getting | 16 // Generates a string of URL query parameters to be used when getting |
| 17 // component and extension updates. These parameters generally remain | 17 // component and extension updates. These parameters generally remain |
| 18 // fixed for a particular build. Embedders can use the delegate to | 18 // fixed for a particular build. Embedders can use the delegate to |
| 19 // define different implementations. This should be used only in the | 19 // define different implementations. This should be used only in the |
| 20 // browser process. | 20 // browser process. |
| 21 class OmahaQueryParams { | 21 class UpdateQueryParams { |
| 22 public: | 22 public: |
| 23 enum ProdId { | 23 enum ProdId { |
| 24 CHROME = 0, | 24 CHROME = 0, |
| 25 CRX, | 25 CRX, |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 // Generates a string of URL query parameters for Omaha. Includes the | 28 // Generates a string of URL query parameters for Omaha. Includes the |
| 29 // following fields: "os", "arch", "nacl_arch", "prod", "prodchannel", | 29 // following fields: "os", "arch", "nacl_arch", "prod", "prodchannel", |
| 30 // "prodversion", and "lang" | 30 // "prodversion", and "lang" |
| 31 static std::string Get(ProdId prod); | 31 static std::string Get(ProdId prod); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 42 // include: "x86", "x64", and "arm". | 42 // include: "x86", "x64", and "arm". |
| 43 static const char* GetArch(); | 43 static const char* GetArch(); |
| 44 | 44 |
| 45 // Returns the value we use for the "nacl_arch" parameter. Note that this may | 45 // Returns the value we use for the "nacl_arch" parameter. Note that this may |
| 46 // be different from the "arch" parameter above (e.g. one may be 32-bit and | 46 // be different from the "arch" parameter above (e.g. one may be 32-bit and |
| 47 // the other 64-bit). Possible return values include: "x86-32", "x86-64", | 47 // the other 64-bit). Possible return values include: "x86-32", "x86-64", |
| 48 // "arm", and "mips32". | 48 // "arm", and "mips32". |
| 49 static const char* GetNaclArch(); | 49 static const char* GetNaclArch(); |
| 50 | 50 |
| 51 // Use this delegate. | 51 // Use this delegate. |
| 52 static void SetDelegate(OmahaQueryParamsDelegate* delegate); | 52 static void SetDelegate(UpdateQueryParamsDelegate* delegate); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_IMPLICIT_CONSTRUCTORS(OmahaQueryParams); | 55 DISALLOW_IMPLICIT_CONSTRUCTORS(UpdateQueryParams); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace omaha_client | 58 } // namespace update_client |
| 59 | 59 |
| 60 #endif // COMPONENTS_OMAHA_CLIENT_OMAHA_QUERY_PARAMS_H_ | 60 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_QUERY_PARAMS_H_ |
| OLD | NEW |