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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.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/browser/data_reduction_proxy_io_data.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
index e53cd86f3ce64a9f97db3c67ec10a06ec0c27d01..5f215b6cc07737adea6a48a7e34fa28d7b73fab1 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
@@ -15,20 +15,21 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
#include "components/data_reduction_proxy/core/common/lofi_decider.h"
#include "components/data_reduction_proxy/core/common/lofi_ui_service.h"
+#include "components/version_info/version_info.h"
namespace base {
class Value;
}
namespace net {
class NetLog;
class URLRequestContextGetter;
class URLRequestInterceptor;
}
@@ -170,20 +171,24 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
}
LoFiUIService* lofi_ui_service() const { return lofi_ui_service_.get(); }
// Takes ownership of |lofi_ui_service|.
void set_lofi_ui_service(
std::unique_ptr<LoFiUIService> lofi_ui_service) const {
lofi_ui_service_ = std::move(lofi_ui_service);
}
+ // The production channel of this build.
+ version_info::Channel channel() { return channel_; }
tbansal1 2016/06/28 21:32:15 const function
RyanSturm 2016/06/28 22:22:14 Done.
+ void set_channel(version_info::Channel channel) { channel_ = channel; }
+
private:
friend class TestDataReductionProxyIOData;
FRIEND_TEST_ALL_PREFIXES(DataReductionProxyIODataTest, TestConstruction);
FRIEND_TEST_ALL_PREFIXES(DataReductionProxyIODataTest,
TestResetBadProxyListOnDisableDataSaver);
// Used for testing.
DataReductionProxyIOData();
// Initializes the weak pointer to |this| on the IO thread. It must be done
@@ -249,17 +254,20 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
// practice, this can be overridden by the command line.
bool enabled_;
// The net::URLRequestContextGetter used for making URL requests.
net::URLRequestContextGetter* url_request_context_getter_;
// A net::URLRequestContextGetter used for making secure proxy checks. It
// does not use alternate protocols.
scoped_refptr<net::URLRequestContextGetter> basic_url_request_context_getter_;
+ // The production channel of this build.
+ version_info::Channel channel_;
tbansal1 2016/06/28 21:32:15 set as const variable, and set it in costructor.
RyanSturm 2016/06/28 22:22:14 Done.
+
base::WeakPtrFactory<DataReductionProxyIOData> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData);
};
} // namespace data_reduction_proxy
#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698