| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ | 5 #ifndef COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ |
| 6 #define COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ | 6 #define COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void RecordStatsForFetch(const GURL& url, | 162 void RecordStatsForFetch(const GURL& url, |
| 163 const GURL& referrer, | 163 const GURL& referrer, |
| 164 const base::TimeDelta& latency, | 164 const base::TimeDelta& latency, |
| 165 const base::Time& fetch_time, | 165 const base::Time& fetch_time, |
| 166 const net::HttpResponseInfo& info, | 166 const net::HttpResponseInfo& info, |
| 167 int64_t size); | 167 int64_t size); |
| 168 | 168 |
| 169 // Update precache-related metrics in response to a URL being fetched. Called | 169 // Update precache-related metrics in response to a URL being fetched. Called |
| 170 // by RecordStatsForFetch() by way of an asynchronous HistoryService callback. | 170 // by RecordStatsForFetch() by way of an asynchronous HistoryService callback. |
| 171 void RecordStatsForFetchInternal(const GURL& url, | 171 void RecordStatsForFetchInternal(const GURL& url, |
| 172 const std::string& referrer_host, |
| 172 const base::TimeDelta& latency, | 173 const base::TimeDelta& latency, |
| 173 const base::Time& fetch_time, | 174 const base::Time& fetch_time, |
| 174 const net::HttpResponseInfo& info, | 175 const net::HttpResponseInfo& info, |
| 175 int64_t size, | 176 int64_t size, |
| 176 int host_rank); | 177 int host_rank); |
| 177 | 178 |
| 178 // The browser context that owns this PrecacheManager. | 179 // The browser context that owns this PrecacheManager. |
| 179 content::BrowserContext* const browser_context_; | 180 content::BrowserContext* const browser_context_; |
| 180 | 181 |
| 181 // The sync service corresponding to the browser context. Used to determine | 182 // The sync service corresponding to the browser context. Used to determine |
| (...skipping 21 matching lines...) Expand all Loading... |
| 203 | 204 |
| 204 // Work that hasn't yet finished. | 205 // Work that hasn't yet finished. |
| 205 std::unique_ptr<PrecacheUnfinishedWork> unfinished_work_; | 206 std::unique_ptr<PrecacheUnfinishedWork> unfinished_work_; |
| 206 | 207 |
| 207 DISALLOW_COPY_AND_ASSIGN(PrecacheManager); | 208 DISALLOW_COPY_AND_ASSIGN(PrecacheManager); |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 } // namespace precache | 211 } // namespace precache |
| 211 | 212 |
| 212 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ | 213 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ |
| OLD | NEW |