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 CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ | 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ |
| 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ | 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <algorithm> | |
|
pasko
2016/09/01 12:30:45
nit: std::pair is in <utility>, including that wou
| |
| 10 #include <list> | 11 #include <list> |
| 11 #include <map> | 12 #include <map> |
| 12 #include <memory> | 13 #include <memory> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
| 17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
| 18 #include "chrome/browser/predictors/resource_prefetch_common.h" | 19 #include "chrome/browser/predictors/resource_prefetch_common.h" |
| 19 #include "net/url_request/redirect_info.h" | 20 #include "net/url_request/redirect_info.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 base::ThreadChecker thread_checker_; | 150 base::ThreadChecker thread_checker_; |
| 150 PrefetcherState state_; | 151 PrefetcherState state_; |
| 151 Delegate* const delegate_; | 152 Delegate* const delegate_; |
| 152 ResourcePrefetchPredictorConfig const config_; | 153 ResourcePrefetchPredictorConfig const config_; |
| 153 NavigationID navigation_id_; | 154 NavigationID navigation_id_; |
| 154 PrefetchKeyType key_type_; | 155 PrefetchKeyType key_type_; |
| 155 std::unique_ptr<RequestVector> request_vector_; | 156 std::unique_ptr<RequestVector> request_vector_; |
| 156 | 157 |
| 157 std::map<net::URLRequest*, Request*> inflight_requests_; | 158 std::map<net::URLRequest*, |
| 159 std::pair<std::unique_ptr<net::URLRequest>, Request*>> | |
| 160 inflight_requests_; | |
| 158 std::list<Request*> request_queue_; | 161 std::list<Request*> request_queue_; |
| 159 std::map<std::string, size_t> host_inflight_counts_; | 162 std::map<std::string, size_t> host_inflight_counts_; |
| 160 | 163 |
| 161 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetcher); | 164 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetcher); |
| 162 }; | 165 }; |
| 163 | 166 |
| 164 } // namespace predictors | 167 } // namespace predictors |
| 165 | 168 |
| 166 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ | 169 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_H_ |
| OLD | NEW |