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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h

Issue 2642793005: Create a Lite Page bit for previews and fallback to Lo-Fi (Closed)
Patch Set: remove unused frame_messages.h code Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT A_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT A_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT A_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT A_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegate() const; 88 std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegate() const;
89 89
90 // Sets user defined preferences for how the Data Reduction Proxy 90 // Sets user defined preferences for how the Data Reduction Proxy
91 // configuration should be set. |at_startup| is true only 91 // configuration should be set. |at_startup| is true only
92 // when DataReductionProxySettings is initialized. 92 // when DataReductionProxySettings is initialized.
93 void SetProxyPrefs(bool enabled, bool at_startup); 93 void SetProxyPrefs(bool enabled, bool at_startup);
94 94
95 // Applies a serialized Data Reduction Proxy configuration. 95 // Applies a serialized Data Reduction Proxy configuration.
96 void SetDataReductionProxyConfiguration(const std::string& serialized_config); 96 void SetDataReductionProxyConfiguration(const std::string& serialized_config);
97 97
98 // Returns true when Lo-Fi mode should be activated. When Lo-Fi mode is 98 // Returns true when Lo-Fi Previews should be activated. When Lo-Fi is
99 // active, URL requests are modified to request low fidelity versions of the 99 // active, URL requests are modified to request low fidelity versions of the
100 // resources, except when the user is in the Lo-Fi control group. 100 // resources, except when the user is in the Lo-Fi control group.
101 bool ShouldEnableLoFiMode(const net::URLRequest& request); 101 bool ShouldEnableLoFi(const net::URLRequest& request);
102
103 // Returns true when Lite Page Previews should be activated. When Lite Pages
104 // are active, a low fidelity transcoded page is requested on the main frame
105 // resource, except when the user is in the control group.
106 bool ShouldEnableLitePages(const net::URLRequest& request);
102 107
103 // Sets Lo-Fi mode off in |config_|. 108 // Sets Lo-Fi mode off in |config_|.
104 void SetLoFiModeOff(); 109 void SetLoFiModeOff();
105 110
106 // Bridge methods to safely call to the UI thread objects. 111 // Bridge methods to safely call to the UI thread objects.
107 void UpdateContentLengths( 112 void UpdateContentLengths(
108 int64_t data_used, 113 int64_t data_used,
109 int64_t original_size, 114 int64_t original_size,
110 bool data_reduction_proxy_enabled, 115 bool data_reduction_proxy_enabled,
111 DataReductionProxyRequestType request_type, 116 DataReductionProxyRequestType request_type,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // The production channel of this build. 296 // The production channel of this build.
292 const std::string channel_; 297 const std::string channel_;
293 298
294 base::WeakPtrFactory<DataReductionProxyIOData> weak_factory_; 299 base::WeakPtrFactory<DataReductionProxyIOData> weak_factory_;
295 300
296 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData); 301 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData);
297 }; 302 };
298 303
299 } // namespace data_reduction_proxy 304 } // namespace data_reduction_proxy
300 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_ DATA_H_ 305 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_ DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698