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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h

Issue 893003002: Data Reduction Proxy class ownership updates and Settings cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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_test_utils.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ffb8d8f465919d58660f2784d409461567a5d61
--- /dev/null
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
@@ -0,0 +1,71 @@
+// 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.
+
+#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_UTILS_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_UTILS_H_
+
+#include "base/macros.h"
+#include "base/test/test_simple_task_runner.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
+#include "net/base/capturing_net_log.h"
+
+namespace net {
+class NetLog;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyConfigurator;
+class DataReductionProxyEventStore;
+class MockDataReductionProxyConfig;
+class TestDataReductionProxyConfig;
+class TestDataReductionProxyConfigurator;
+
+class TestDataReductionProxyIOData : public DataReductionProxyIOData {
+ public:
+ TestDataReductionProxyIOData(TestDataReductionProxyConfig* config,
+ DataReductionProxyEventStore* event_store);
+ ~TestDataReductionProxyIOData() override;
+
+ DataReductionProxyConfig* config() const override;
+
+ DataReductionProxyEventStore* event_store() const override;
+
+ private:
+ DataReductionProxyConfig* config_;
+
+ DataReductionProxyEventStore* event_store_;
+};
+
+class DataReductionProxyTestContext {
+ public:
+ DataReductionProxyTestContext(bool use_mock_config);
+ virtual ~DataReductionProxyTestContext();
+
+ DataReductionProxyEventStore* event_store() {
+ return event_store_.get();
+ }
+
+ TestDataReductionProxyConfig* config() {
+ return config_.get();
+ }
+
+ TestDataReductionProxyIOData* io_data() {
+ return io_data_.get();
+ }
+
+ private:
+ scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
+ net::CapturingNetLog net_log_;
+
+ scoped_ptr<DataReductionProxyEventStore> event_store_;
+ scoped_ptr<TestDataReductionProxyConfigurator> configurator_;
+ scoped_ptr<TestDataReductionProxyConfig> config_;
+ scoped_ptr<TestDataReductionProxyIOData> io_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTestContext);
+};
+
+} // namespace data_reduction_proxy
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698