| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Initializes the Monitor's URLRequestContextGetter. | 82 // Initializes the Monitor's URLRequestContextGetter. |
| 83 // | 83 // |
| 84 // Must be called on the network thread, after |MoveToNetworkThread|. | 84 // Must be called on the network thread, after |MoveToNetworkThread|. |
| 85 void InitURLRequestContext(net::URLRequestContext* url_request_context); | 85 void InitURLRequestContext(net::URLRequestContext* url_request_context); |
| 86 | 86 |
| 87 // Same, but for unittests where the Getter is readily available. | 87 // Same, but for unittests where the Getter is readily available. |
| 88 void InitURLRequestContext( | 88 void InitURLRequestContext( |
| 89 const scoped_refptr<net::URLRequestContextGetter>& | 89 const scoped_refptr<net::URLRequestContextGetter>& |
| 90 url_request_context_getter); | 90 url_request_context_getter); |
| 91 | 91 |
| 92 void Shutdown(); |
| 93 |
| 92 // Populates the monitor with contexts that were configured at compile time. | 94 // Populates the monitor with contexts that were configured at compile time. |
| 93 void AddBakedInConfigs(); | 95 void AddBakedInConfigs(); |
| 94 | 96 |
| 95 // Sets whether the uploader will discard uploads. Must be called after | 97 // Sets whether the uploader will discard uploads. Must be called after |
| 96 // |InitURLRequestContext|. | 98 // |InitURLRequestContext|. |
| 97 void SetDiscardUploads(bool discard_uploads); | 99 void SetDiscardUploads(bool discard_uploads); |
| 98 | 100 |
| 99 // Should be called when |request| is about to follow a redirect. Will | 101 // Should be called when |request| is about to follow a redirect. Will |
| 100 // examine and possibly log the redirect request. Must be called after | 102 // examine and possibly log the redirect request. Must be called after |
| 101 // |SetDiscardUploads|. | 103 // |SetDiscardUploads|. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 bool discard_uploads_set_; | 191 bool discard_uploads_set_; |
| 190 | 192 |
| 191 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; | 193 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; |
| 192 | 194 |
| 193 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); | 195 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 } // namespace domain_reliability | 198 } // namespace domain_reliability |
| 197 | 199 |
| 198 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ | 200 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ |
| OLD | NEW |