| 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 043664b7713b972702d5464835cdd0b9505e7e09..cf7dea0b8ce42a6f4a69657548fe380082f39acf 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];
|
| }
|
|
|
| const char* GetStringForClient(Client client) {
|
| switch (client) {
|
| case Client::UNKNOWN:
|
| return "";
|
| case Client::CRONET_ANDROID:
|
| return "cronet";
|
| case Client::WEBVIEW_ANDROID:
|
| return "webview";
|
|
|