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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc

Issue 390533003: Bypassed Bytes UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed RecordingBypassedBytes Created 6 years, 5 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/browser/data_reduction_proxy_protocol. h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 : net::NetworkDelegate(), test_data_reduction_proxy_params_(test_params) { 58 : net::NetworkDelegate(), test_data_reduction_proxy_params_(test_params) {
59 } 59 }
60 60
61 virtual int OnHeadersReceived( 61 virtual int OnHeadersReceived(
62 URLRequest* request, 62 URLRequest* request,
63 const net::CompletionCallback& callback, 63 const net::CompletionCallback& callback,
64 const HttpResponseHeaders* original_response_headers, 64 const HttpResponseHeaders* original_response_headers,
65 scoped_refptr<HttpResponseHeaders>* override_response_headers, 65 scoped_refptr<HttpResponseHeaders>* override_response_headers,
66 GURL* allowed_unsafe_redirect_url) OVERRIDE { 66 GURL* allowed_unsafe_redirect_url) OVERRIDE {
67 data_reduction_proxy::MaybeBypassProxyAndPrepareToRetry( 67 data_reduction_proxy::MaybeBypassProxyAndPrepareToRetry(
68 net::ProxyService::DataReductionProxyBypassType::BYPASS_EVENT_TYPE_MAX,
68 test_data_reduction_proxy_params_, 69 test_data_reduction_proxy_params_,
69 request, 70 request,
70 original_response_headers, 71 original_response_headers,
71 override_response_headers); 72 override_response_headers);
72 return net::OK; 73 return net::OK;
73 } 74 }
74 75
75 TestDataReductionProxyParams* test_data_reduction_proxy_params_; 76 TestDataReductionProxyParams* test_data_reduction_proxy_params_;
76 }; 77 };
77 78
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status()); 606 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status());
606 EXPECT_EQ(net::OK, r.status().error()); 607 EXPECT_EQ(net::OK, r.status().error());
607 608
608 EXPECT_EQ("Bypass message", d.data_received()); 609 EXPECT_EQ("Bypass message", d.data_received());
609 610
610 // We should have no entries in our bad proxy list. 611 // We should have no entries in our bad proxy list.
611 TestBadProxies(0, -1, "", ""); 612 TestBadProxies(0, -1, "", "");
612 } 613 }
613 614
614 } // namespace data_reduction_proxy 615 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698