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

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

Issue 2261103002: Use modified URLRequest::Read() and delegate methods in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: comments Created 4 years, 3 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 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS _STATS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS _STATS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS _STATS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS _STATS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // hook to inform the user that the Data Reduction Proxy is unreachable. 50 // hook to inform the user that the Data Reduction Proxy is unreachable.
51 // |config| must not be null. 51 // |config| must not be null.
52 DataReductionProxyBypassStats( 52 DataReductionProxyBypassStats(
53 DataReductionProxyConfig* config, 53 DataReductionProxyConfig* config,
54 UnreachableCallback unreachable_callback); 54 UnreachableCallback unreachable_callback);
55 55
56 ~DataReductionProxyBypassStats() override; 56 ~DataReductionProxyBypassStats() override;
57 57
58 // Callback intended to be called from |DataReductionProxyNetworkDelegate| 58 // Callback intended to be called from |DataReductionProxyNetworkDelegate|
59 // when a request completes. This method is used to gather bypass stats. 59 // when a request completes. This method is used to gather bypass stats.
60 void OnUrlRequestCompleted(const net::URLRequest* request, bool started); 60 void OnUrlRequestCompleted(const net::URLRequest* request,
61 bool started,
62 int net_error);
61 63
62 // Records the last bypass reason to |bypass_type_| and sets 64 // Records the last bypass reason to |bypass_type_| and sets
63 // |triggering_request_| to true. A triggering request is the first request to 65 // |triggering_request_| to true. A triggering request is the first request to
64 // cause the current bypass. 66 // cause the current bypass.
65 void SetBypassType(DataReductionProxyBypassType type); 67 void SetBypassType(DataReductionProxyBypassType type);
66 68
67 // Visible for testing. 69 // Visible for testing.
68 DataReductionProxyBypassType GetBypassType() const; 70 DataReductionProxyBypassType GetBypassType() const;
69 71
70 // Records all the data reduction proxy bytes-related histograms for the 72 // Records all the data reduction proxy bytes-related histograms for the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 153
152 // Whether or not the data reduction proxy is unavailable. 154 // Whether or not the data reduction proxy is unavailable.
153 bool unavailable_; 155 bool unavailable_;
154 156
155 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassStats); 157 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassStats);
156 }; 158 };
157 159
158 } // namespace data_reduction_proxy 160 } // namespace data_reduction_proxy
159 161
160 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYP ASS_STATS_H_ 162 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYP ASS_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698