Chromium Code Reviews| Index: components/data_reduction_proxy/core/common/lofi_decider.h |
| diff --git a/components/data_reduction_proxy/core/common/lofi_decider.h b/components/data_reduction_proxy/core/common/lofi_decider.h |
| index 2eca7590fdb2d5545c9dd490b95edeecfb31c5ef..e1e660306566de5abd5bbeb4b058e06960d86340 100644 |
| --- a/components/data_reduction_proxy/core/common/lofi_decider.h |
| +++ b/components/data_reduction_proxy/core/common/lofi_decider.h |
| @@ -2,8 +2,8 @@ |
| // 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_LOFI_DECIDER_H_ |
| -#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_LOFI_DECIDER_H_ |
| +#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_LOFI_DECIDER_H_ |
| +#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_LOFI_DECIDER_H_ |
| #include "base/macros.h" |
| @@ -28,14 +28,9 @@ class LoFiDecider { |
| // header if needed. If a slow page preview is triggered, adds "lite-page" or |
|
megjablon
2017/04/25 23:10:37
s/If a slow page preview is/If a preview
dougarnett
2017/04/26 19:50:49
Done.
|
| // "empty-image", depending on whether the request is for the main frame |
| // and lite pages are enabled, or for a subresource and Lo-Fi mode is enabled, |
| - // respectively. If a slow page preview is not triggered, "lite-page;if-heavy" |
| - // and "empty-image;if-heavy" are added in the respective aforementioned cases |
| - // to request that the server transform the page if it determines it to be |
| - // heavy. Previews-related transformation headers are never added if |
| - // |is_previews_disabled| is true. |
| + // respectively. |
| virtual void MaybeSetAcceptTransformHeader( |
| const net::URLRequest& request, |
| - bool are_previews_disabled, |
| net::HttpRequestHeaders* headers) const = 0; |
| // Returns true if |headers| contains the Chrome-Proxy-Accept-Transform |
| @@ -54,17 +49,18 @@ class LoFiDecider { |
| virtual void RemoveAcceptTransformHeader( |
| net::HttpRequestHeaders* headers) const = 0; |
| - // Adds a directive to tell the server to ignore blacklists when a Lite Page |
| - // preview is being requested due to command line flags being set. |
| - virtual void MaybeSetIgnorePreviewsBlacklistDirective( |
| + // Adds a directive to tell the server to return a Lite Page preview due to |
| + // command line flags being set (in spite of a good network connection or |
| + // the page not being heavy). |
|
megjablon
2017/04/25 23:10:36
(in spite of a good network connection, the page b
dougarnett
2017/04/26 19:50:49
Done.
|
| + virtual void MaybeSetForceLitePageDirective( |
| net::HttpRequestHeaders* headers) const = 0; |
| // Returns true if the Lo-Fi specific UMA should be recorded. It is set to |
| - // true if Lo-Fi is enabled for |request|, Chrome session is in Lo-Fi |
| - // Enabled or Control field trial, and the network quality was slow. |
| + // true if Lo-Fi is enabled for |request| or Chrome session is in Lo-Fi |
|
megjablon
2017/04/25 23:10:36
This should still be 'and'
dougarnett
2017/04/26 19:50:49
Done.
|
| + // Enabled or Control field trial. |
| virtual bool ShouldRecordLoFiUMA(const net::URLRequest& request) const = 0; |
|
megjablon
2017/04/25 23:10:36
Rename this to ShouldRecordPreviewsUMA? Since it d
dougarnett
2017/04/26 19:50:49
Done.
|
| }; |
| } // namespace data_reduction_proxy |
| -#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_LOFI_DECIDER_H_ |
| +#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_LOFI_DECIDER_H_ |