| Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
|
| diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
|
| index ff30a18f383ea12edb9ae28d0ad7a6c541765d15..1faf4aa86dac7cdd60802adfabafef7347948f27 100644
|
| --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
|
| +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
|
| @@ -4,11 +4,14 @@
|
|
|
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
|
|
|
| +#include "base/strings/string_split.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
|
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| +#include "chrome/common/chrome_version_info.h"
|
| +#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
|
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h"
|
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
|
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
|
| @@ -49,3 +52,24 @@ void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial(
|
| "DataReductionProxyEnabled",
|
| data_reduction_proxy_enabled ? "true" : "false");
|
| }
|
| +
|
| +// static
|
| +std::string DataReductionProxyChromeSettings::GetBuildAndPatchNumber() {
|
| + chrome::VersionInfo version_info;
|
| + std::vector<std::string> version_parts;
|
| + base::SplitString(version_info.Version(), '.', &version_parts);
|
| + if (version_parts.size() != 4)
|
| + return "";
|
| + return version_parts[2] + version_parts[3];
|
| +}
|
| +
|
| +// static
|
| +std::string DataReductionProxyChromeSettings::GetClient() {
|
| +#if defined(OS_ANDROID)
|
| + return data_reduction_proxy::kClientChromeAndroid;
|
| +#elif defined(OS_IOS)
|
| + return data_reduction_proxy::kClientChromeIOS;
|
| +#else
|
| + return "";
|
| +#endif
|
| +}
|
|
|