Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_util.h

Issue 2103223002: Adding version info to the client config request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing leftover headers Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
index dcefb8cf48077576df879e63dd24af52334ea650..43b916ff0b5db67a8a5a4efcf1b52985a6b5ac32 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_util.h
@@ -2,20 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_UTIL_H_
#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_UTIL_H_
#include <memory>
#include <string>
#include "components/data_reduction_proxy/proto/client_config.pb.h"
+#include "components/version_info/version_info.h"
#include "net/proxy/proxy_retry_info.h"
#include "net/proxy/proxy_server.h"
#include "url/gurl.h"
namespace base {
class Time;
class TimeDelta;
}
namespace net {
@@ -53,20 +54,26 @@ bool ApplyProxyConfigToProxyInfo(const net::ProxyConfig& proxy_config,
namespace protobuf_parser {
// Returns the |net::ProxyServer::Scheme| for a ProxyServer_ProxyScheme.
net::ProxyServer::Scheme SchemeFromProxyScheme(
ProxyServer_ProxyScheme proxy_scheme);
// Returns the ProxyServer_ProxyScheme for a |net::ProxyServer::Scheme|.
ProxyServer_ProxyScheme ProxySchemeFromScheme(net::ProxyServer::Scheme scheme);
+// Returns the VersionInfo_Channel for a |version_info::Channel|.
+VersionInfo_Channel ProtoChannelFromChannel(version_info::Channel channel);
+
+// Returns the |version_info::Channel| for a VersionInfo_Channel.
+version_info::Channel ChannelFromProtoChannel(VersionInfo_Channel channel);
+
// Returns the |Duration| representation of |time_delta|.
void TimeDeltaToDuration(const base::TimeDelta& time_delta, Duration* duration);
// Returns the |base::TimeDelta| representation of |duration|. This is accurate
// to the microsecond.
base::TimeDelta DurationToTimeDelta(const Duration& duration);
// Returns the |Timestamp| representation of |time|.
void TimeToTimestamp(const base::Time& time, Timestamp* timestamp);

Powered by Google App Engine
This is Rietveld 408576698