| 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 12dd44138384e57d85c2e7d484daadd0cfc5cd90..5aae344cb4de4eb6f5a3f38e6c80c5df986875ab 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
|
| @@ -40,26 +40,35 @@ const char* ChromiumVersion() {
|
| "PRODUCT_VERSION must be a string of the form "
|
| "'MAJOR.MINOR.BUILD.PATCH', e.g. '1.2.3.4'. "
|
| "PRODUCT_VERSION='" PRODUCT_VERSION "' is badly formed.");
|
|
|
| return PRODUCT_VERSION;
|
| }
|
|
|
| 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 "";
|
| }
|
|
|