OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
11 #include <utility> | 12 #include <utility> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/cancelable_callback.h" | 15 #include "base/cancelable_callback.h" |
15 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | |
19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 FORWARD_DECLARE_TEST(AppCacheGroupTest, StartUpdate); | 25 FORWARD_DECLARE_TEST(AppCacheGroupTest, StartUpdate); |
26 FORWARD_DECLARE_TEST(AppCacheGroupTest, CancelUpdate); | 26 FORWARD_DECLARE_TEST(AppCacheGroupTest, CancelUpdate); |
27 FORWARD_DECLARE_TEST(AppCacheGroupTest, QueueUpdate); | 27 FORWARD_DECLARE_TEST(AppCacheGroupTest, QueueUpdate); |
28 FORWARD_DECLARE_TEST(AppCacheUpdateJobTest, AlreadyChecking); | 28 FORWARD_DECLARE_TEST(AppCacheUpdateJobTest, AlreadyChecking); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Central storage object. | 174 // Central storage object. |
175 AppCacheStorage* storage_; | 175 AppCacheStorage* storage_; |
176 | 176 |
177 // List of objects observing this group. | 177 // List of objects observing this group. |
178 base::ObserverList<UpdateObserver> observers_; | 178 base::ObserverList<UpdateObserver> observers_; |
179 | 179 |
180 // Updates that have been queued for the next run. | 180 // Updates that have been queued for the next run. |
181 QueuedUpdates queued_updates_; | 181 QueuedUpdates queued_updates_; |
182 base::ObserverList<UpdateObserver> queued_observers_; | 182 base::ObserverList<UpdateObserver> queued_observers_; |
183 base::CancelableClosure restart_update_task_; | 183 base::CancelableClosure restart_update_task_; |
184 scoped_ptr<HostObserver> host_observer_; | 184 std::unique_ptr<HostObserver> host_observer_; |
185 | 185 |
186 // True if we're in our destructor. | 186 // True if we're in our destructor. |
187 bool is_in_dtor_; | 187 bool is_in_dtor_; |
188 | 188 |
189 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, StartUpdate); | 189 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, StartUpdate); |
190 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, CancelUpdate); | 190 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, CancelUpdate); |
191 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); | 191 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); |
192 FRIEND_TEST_ALL_PREFIXES(content::AppCacheUpdateJobTest, AlreadyChecking); | 192 FRIEND_TEST_ALL_PREFIXES(content::AppCacheUpdateJobTest, AlreadyChecking); |
193 FRIEND_TEST_ALL_PREFIXES(content::AppCacheUpdateJobTest, AlreadyDownloading); | 193 FRIEND_TEST_ALL_PREFIXES(content::AppCacheUpdateJobTest, AlreadyDownloading); |
194 | 194 |
195 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup); | 195 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup); |
196 }; | 196 }; |
197 | 197 |
198 } // namespace content | 198 } // namespace content |
199 | 199 |
200 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ | 200 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_ |
OLD | NEW |