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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc

Issue 2887423002: Add an about:flag to support alternative data saver features (Closed)
Patch Set: tbansal nits Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return false; 187 return false;
188 } 188 }
189 189
190 void RemoveAcceptTransformHeader( 190 void RemoveAcceptTransformHeader(
191 net::HttpRequestHeaders* headers) const override { 191 net::HttpRequestHeaders* headers) const override {
192 if (ignore_is_using_data_reduction_proxy_check_) 192 if (ignore_is_using_data_reduction_proxy_check_)
193 return; 193 return;
194 headers->RemoveHeader(chrome_proxy_accept_transform_header()); 194 headers->RemoveHeader(chrome_proxy_accept_transform_header());
195 } 195 }
196 196
197 void MaybeSetIgnorePreviewsBlacklistDirective(
198 net::HttpRequestHeaders* headers) const override {}
199
200 bool ShouldRecordLoFiUMA(const net::URLRequest& request) const override { 197 bool ShouldRecordLoFiUMA(const net::URLRequest& request) const override {
201 return should_request_lofi_resource_; 198 return should_request_lofi_resource_;
202 } 199 }
203 200
204 bool IsClientLoFiImageRequest(const net::URLRequest& request) const override { 201 bool IsClientLoFiImageRequest(const net::URLRequest& request) const override {
205 return should_be_client_lofi_; 202 return should_be_client_lofi_;
206 } 203 }
207 204
208 bool IsClientLoFiAutoReloadRequest( 205 bool IsClientLoFiAutoReloadRequest(
209 const net::URLRequest& request) const override { 206 const net::URLRequest& request) const override {
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 EXPECT_EQ(static_cast<int64_t>(net::HttpUtil::AssembleRawHeaders( 1869 EXPECT_EQ(static_cast<int64_t>(net::HttpUtil::AssembleRawHeaders(
1873 kHeaders, sizeof(kHeaders) - 1) 1870 kHeaders, sizeof(kHeaders) - 1)
1874 .size() + 1871 .size() +
1875 10000 - request->GetTotalReceivedBytes()), 1872 10000 - request->GetTotalReceivedBytes()),
1876 GetSavings()); 1873 GetSavings());
1877 } 1874 }
1878 1875
1879 } // namespace 1876 } // namespace
1880 1877
1881 } // namespace data_reduction_proxy 1878 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698