OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UPDATE_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "base/timer/timer.h" |
17 #include "content/browser/appcache/appcache.h" | 18 #include "content/browser/appcache/appcache.h" |
18 #include "content/browser/appcache/appcache_host.h" | 19 #include "content/browser/appcache/appcache_host.h" |
19 #include "content/browser/appcache/appcache_response.h" | 20 #include "content/browser/appcache/appcache_response.h" |
20 #include "content/browser/appcache/appcache_service_impl.h" | 21 #include "content/browser/appcache/appcache_service_impl.h" |
21 #include "content/browser/appcache/appcache_storage.h" | 22 #include "content/browser/appcache/appcache_storage.h" |
22 #include "content/common/appcache_interfaces.h" | 23 #include "content/common/appcache_interfaces.h" |
23 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
24 #include "net/base/completion_callback.h" | 25 #include "net/base/completion_callback.h" |
25 #include "net/http/http_response_headers.h" | 26 #include "net/http/http_response_headers.h" |
26 #include "net/url_request/url_request.h" | 27 #include "net/url_request/url_request.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // have to delete the duplicates upon successful update. These ids | 329 // have to delete the duplicates upon successful update. These ids |
329 // are also in the stored_response_ids_ collection so we only schedule | 330 // are also in the stored_response_ids_ collection so we only schedule |
330 // these for deletion on success. | 331 // these for deletion on success. |
331 // TODO(michaeln): Rework when we no longer fetches master entries directly. | 332 // TODO(michaeln): Rework when we no longer fetches master entries directly. |
332 std::vector<int64> duplicate_response_ids_; | 333 std::vector<int64> duplicate_response_ids_; |
333 | 334 |
334 // Whether we've stored the resulting group/cache yet. | 335 // Whether we've stored the resulting group/cache yet. |
335 StoredState stored_state_; | 336 StoredState stored_state_; |
336 | 337 |
337 AppCacheStorage* storage_; | 338 AppCacheStorage* storage_; |
| 339 base::WeakPtrFactory<AppCacheUpdateJob> weak_factory_; |
338 | 340 |
339 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); | 341 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); |
340 | 342 |
341 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 343 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
342 }; | 344 }; |
343 | 345 |
344 } // namespace content | 346 } // namespace content |
345 | 347 |
346 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 348 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
OLD | NEW |