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

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

Issue 966443002: Add DataReductionProxy IPC to determine if the Data Reduction Proxy was used. (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/content/browser/data_reduction_proxy_message_filter.h
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h b/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..52ca776753c7d452f97ba64a2484ff49b30634d1
--- /dev/null
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h
@@ -0,0 +1,43 @@
+// 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_CONTENT_BROWSER_DATA_REDUCTION_PROXY_MESSAGE_FILTER_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_MESSAGE_FILTER_H_
+
+#include "base/macros.h"
+#include "content/public/browser/browser_message_filter.h"
+
+namespace net {
+class HostPortPair;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyConfig;
+class DataReductionProxySettings;
+
+class DataReductionProxyMessageFilter
bengr 2015/02/26 22:52:52 Add a class comment and comment for each method.
jeremyim 2015/02/27 04:38:40 Done.
+ : public content::BrowserMessageFilter {
+ public:
+ DataReductionProxyMessageFilter(DataReductionProxySettings* settings);
+
+ void OnWasDataReductionProxyUsed(const net::HostPortPair& proxy_server,
bengr 2015/02/26 22:52:52 This name is awful.
jeremyim 2015/02/27 04:38:41 Done.
+ bool* response);
+
+ private:
+ ~DataReductionProxyMessageFilter() override;
+
+ // BrowserMessageFilter implementation.
+ bool OnMessageReceived(const IPC::Message& message) override;
+ void OverrideThreadForMessage(const IPC::Message& message,
+ content::BrowserThread::ID* thread) override;
+
+ DataReductionProxyConfig* config_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMessageFilter);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698