| Index: components/data_reduction_proxy/core/common/data_reduction_proxy_util.cc
|
| diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.cc
|
| index b55bba792024c7e09314334a5016af50ed2da592..c4433f472f5441822ef52a5539c02950d162ccdd 100644
|
| --- a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.cc
|
| +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.cc
|
| @@ -43,26 +43,35 @@ const char* ChromiumVersion() {
|
| "PRODUCT_VERSION='" PRODUCT_VERSION "' is badly formed.");
|
|
|
| return PRODUCT_VERSION;
|
| }
|
|
|
| // Returns the build and patch numbers of |version_string|. |version_string|
|
| // must be a properly formed Chromium version number, e.g. "1.2.3.4".
|
| void GetChromiumBuildAndPatch(const std::string& version_string,
|
| std::string* build,
|
| std::string* patch) {
|
| + uint32_t build_number;
|
| + uint32_t patch_number;
|
| + GetChromiumBuildAndPatchAsInts(version_string, &build_number, &patch_number);
|
| + *build = base::Uint64ToString(build_number);
|
| + *patch = base::Uint64ToString(patch_number);
|
| +}
|
| +
|
| +void GetChromiumBuildAndPatchAsInts(const std::string& version_string,
|
| + uint32_t* build,
|
| + uint32_t* patch) {
|
| base::Version version(version_string);
|
| DCHECK(version.IsValid());
|
| DCHECK_EQ(4U, version.components().size());
|
| -
|
| - *build = base::Uint64ToString(version.components()[2]);
|
| - *patch = base::Uint64ToString(version.components()[3]);
|
| + *build = version.components()[2];
|
| + *patch = version.components()[3];
|
| }
|
|
|
| #define CLIENT_ENUM(name, str_value) \
|
| case name: \
|
| return str_value;
|
| const char* GetString(Client client) {
|
| switch (client) { CLIENT_ENUMS_LIST }
|
| NOTREACHED();
|
| return "";
|
| }
|
|
|