Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_DOMAIN_RELIABILITY_MONITOR_H_ | 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ |
| 6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ | 6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 friend class DomainReliabilityMonitorTest; | 139 friend class DomainReliabilityMonitorTest; |
| 140 // Allow the Service to call |MakeWeakPtr|. | 140 // Allow the Service to call |MakeWeakPtr|. |
| 141 friend class DomainReliabilityServiceImpl; | 141 friend class DomainReliabilityServiceImpl; |
| 142 | 142 |
| 143 typedef std::map<std::string, DomainReliabilityContext*> ContextMap; | 143 typedef std::map<std::string, DomainReliabilityContext*> ContextMap; |
| 144 | 144 |
| 145 struct DOMAIN_RELIABILITY_EXPORT RequestInfo { | 145 struct DOMAIN_RELIABILITY_EXPORT RequestInfo { |
| 146 RequestInfo(); | 146 RequestInfo(); |
| 147 explicit RequestInfo(const net::URLRequest& request); | 147 explicit RequestInfo(const net::URLRequest& request, int net_error); |
|
davidben
2016/09/06 17:07:28
No need for 'explicit' with two arguments.
| |
| 148 RequestInfo(const RequestInfo& other); | 148 RequestInfo(const RequestInfo& other); |
| 149 ~RequestInfo(); | 149 ~RequestInfo(); |
| 150 | 150 |
| 151 static bool ShouldReportRequest(const RequestInfo& request); | 151 static bool ShouldReportRequest(const RequestInfo& request); |
| 152 | 152 |
| 153 GURL url; | 153 GURL url; |
| 154 net::URLRequestStatus status; | 154 int net_error; |
| 155 net::HttpResponseInfo response_info; | 155 net::HttpResponseInfo response_info; |
| 156 int load_flags; | 156 int load_flags; |
| 157 net::LoadTimingInfo load_timing_info; | 157 net::LoadTimingInfo load_timing_info; |
| 158 net::ConnectionAttempts connection_attempts; | 158 net::ConnectionAttempts connection_attempts; |
| 159 net::IPEndPoint remote_endpoint; | 159 net::IPEndPoint remote_endpoint; |
| 160 int upload_depth; | 160 int upload_depth; |
| 161 net::NetErrorDetails details; | 161 net::NetErrorDetails details; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 void OnRequestLegComplete(const RequestInfo& info); | 164 void OnRequestLegComplete(const RequestInfo& info); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 189 bool discard_uploads_set_; | 189 bool discard_uploads_set_; |
| 190 | 190 |
| 191 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; | 191 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; |
| 192 | 192 |
| 193 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); | 193 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 } // namespace domain_reliability | 196 } // namespace domain_reliability |
| 197 | 197 |
| 198 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ | 198 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ |
| OLD | NEW |