Index: components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h |
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d445b800d3729862be1127a8ce42ff23385938e0 |
--- /dev/null |
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_lofi_helper.h |
@@ -0,0 +1,27 @@ |
+// 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_LOFI_HELPER_H_ |
+#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_LOFI_HELPER_H_ |
+ |
+#include "base/macros.h" |
+#include "net/url_request/url_request.h" |
+ |
+namespace data_reduction_proxy { |
+ |
+// An interface for the ContentDataReductionProxyLoFiHelper which creates |
bengr
2015/10/03 00:01:30
This comment seems to be a layering violation. The
megjablon
2015/10/05 20:22:58
Done.
|
+// a DataReductionProxyLoFiHelper that handles getting if a request is in Lo-Fi |
+// mode. |
+class DataReductionProxyLoFiHelper { |
bengr
2015/10/03 00:01:30
I'd really, really like to drop the DataReductionP
megjablon
2015/10/05 20:22:58
Done.
|
+ public: |
+ virtual ~DataReductionProxyLoFiHelper() {} |
+ |
+ // Returns true if the Lo-Fi directive should be added to the Chrome-Proxy |
bengr
2015/10/03 00:01:30
Why do we need a class? Couldn't this just be an i
megjablon
2015/10/05 20:22:58
We can't inject a callback into OnBeforeSendProxyH
|
+ // header for the given request. |
+ virtual bool ShouldUseLoFi(const net::URLRequest* request) const = 0; |
bengr
2015/10/03 00:01:30
I understand why you have this interface, but the
megjablon
2015/10/05 20:22:58
Done.
|
+}; |
+ |
+} // namespace data_reduction_proxy |
+ |
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_LOFI_HELPER_H_ |