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 |
11 #include <list> | 11 #include <list> |
| 12 #include <memory> |
12 #include <string> | 13 #include <string> |
13 #include <utility> | 14 #include <utility> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/callback.h" | 17 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
18 #include "base/macros.h" | 19 #include "base/macros.h" |
19 #include "base/memory/scoped_ptr.h" | |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "components/history/core/browser/history_types.h" | 21 #include "components/history/core/browser/history_types.h" |
22 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
23 #include "components/precache/core/precache_fetcher.h" | 23 #include "components/precache/core/precache_fetcher.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 class Time; | 27 class Time; |
28 } | 28 } |
29 | 29 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // The sync service corresponding to the browser context. Used to determine | 142 // The sync service corresponding to the browser context. Used to determine |
143 // whether precache can run. May be null. | 143 // whether precache can run. May be null. |
144 const sync_driver::SyncService* const sync_service_; | 144 const sync_driver::SyncService* const sync_service_; |
145 | 145 |
146 // The history service corresponding to the browser context. Used to determine | 146 // The history service corresponding to the browser context. Used to determine |
147 // the list of top hosts. May be null. | 147 // the list of top hosts. May be null. |
148 const history::HistoryService* const history_service_; | 148 const history::HistoryService* const history_service_; |
149 | 149 |
150 // The PrecacheFetcher used to precache resources. Should only be used on the | 150 // The PrecacheFetcher used to precache resources. Should only be used on the |
151 // UI thread. | 151 // UI thread. |
152 scoped_ptr<PrecacheFetcher> precache_fetcher_; | 152 std::unique_ptr<PrecacheFetcher> precache_fetcher_; |
153 | 153 |
154 // The callback that will be run if precaching finishes without being | 154 // The callback that will be run if precaching finishes without being |
155 // canceled. | 155 // canceled. |
156 PrecacheCompletionCallback precache_completion_callback_; | 156 PrecacheCompletionCallback precache_completion_callback_; |
157 | 157 |
158 // The PrecacheDatabase for tracking precache metrics. Should only be used on | 158 // The PrecacheDatabase for tracking precache metrics. Should only be used on |
159 // the DB thread. | 159 // the DB thread. |
160 scoped_ptr<PrecacheDatabase> precache_database_; | 160 std::unique_ptr<PrecacheDatabase> precache_database_; |
161 | 161 |
162 // Flag indicating whether or not precaching is currently in progress. | 162 // Flag indicating whether or not precaching is currently in progress. |
163 bool is_precaching_; | 163 bool is_precaching_; |
164 | 164 |
165 DISALLOW_COPY_AND_ASSIGN(PrecacheManager); | 165 DISALLOW_COPY_AND_ASSIGN(PrecacheManager); |
166 }; | 166 }; |
167 | 167 |
168 } // namespace precache | 168 } // namespace precache |
169 | 169 |
170 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ | 170 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ |
OLD | NEW |