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

Unified Diff: components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate usage of RPH observer Created 4 years, 4 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/content/browser/data_reduction_proxy_host_impl.h
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h b/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..718d6dc140a09439f54d33f59680972be22ab507
--- /dev/null
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h
@@ -0,0 +1,46 @@
+// Copyright 2016 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_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/data_reduction_proxy/content/common/data_reduction_proxy.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace net {
+class HostPortPair;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyConfig;
+
+class DataReductionProxyHostImpl : public mojom::DataReductionProxyHost {
+ public:
+ static void Create(base::WeakPtr<DataReductionProxyConfig> config,
+ mojom::DataReductionProxyHostRequest request);
+
+ DataReductionProxyHostImpl(base::WeakPtr<DataReductionProxyConfig> config,
+ mojom::DataReductionProxyHostRequest request);
+
+ ~DataReductionProxyHostImpl() override;
+
+ // mojom::DataReductionProxyHost methods:
+ void IsDataReductionProxy(
+ const net::HostPortPair& proxy_server,
+ const IsDataReductionProxyCallback& callback) override;
+
+ private:
+ base::WeakPtr<DataReductionProxyConfig> config_;
+
+ mojo::StrongBinding<mojom::DataReductionProxyHost> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyHostImpl);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698