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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc

Issue 880963006: Create a new DataReductionProxyConfig class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_configurator_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a86845f904f25c80c7fc6492007320dd801ff3f4
--- /dev/null
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.h"
+
+namespace data_reduction_proxy {
+
+TestDataReductionProxyConfigurator::TestDataReductionProxyConfigurator(
+ scoped_refptr<base::SequencedTaskRunner> network_task_runner,
+ net::NetLog* net_log,
+ DataReductionProxyEventStore* event_store)
+ : DataReductionProxyConfigurator(network_task_runner, net_log, event_store),
+ enabled_(false),
+ restricted_(false),
+ fallback_restricted_(false) {
+}
+
+TestDataReductionProxyConfigurator::~TestDataReductionProxyConfigurator() {
+}
+
+void TestDataReductionProxyConfigurator::Enable(
+ bool restricted,
+ bool fallback_restricted,
+ const std::string& primary_origin,
+ const std::string& fallback_origin,
+ const std::string& ssl_origin) {
+ enabled_ = true;
+ restricted_ = restricted;
+ fallback_restricted_ = fallback_restricted;
+ origin_ = primary_origin;
+ fallback_origin_ = fallback_origin;
+ ssl_origin_ = ssl_origin;
+}
+
+void TestDataReductionProxyConfigurator::Disable() {
+ enabled_ = false;
+ restricted_ = false;
+ fallback_restricted_ = false;
+ origin_ = std::string();
+ fallback_origin_ = std::string();
+ ssl_origin_ = std::string();
+}
+
+} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698