Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Side by Side Diff: webkit/appcache/appcache_quota_client.h

Issue 9456036: Work around CancelableCompletionCallback threading restrictions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/appcache/appcache_quota_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_
6 #define WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ 6 #define WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 APPCACHE_EXPORT explicit AppCacheQuotaClient(AppCacheService* service); 59 APPCACHE_EXPORT explicit AppCacheQuotaClient(AppCacheService* service);
60 60
61 void DidDeleteAppCachesForOrigin(int rv); 61 void DidDeleteAppCachesForOrigin(int rv);
62 void GetOriginsHelper(quota::StorageType type, 62 void GetOriginsHelper(quota::StorageType type,
63 const std::string& opt_host, 63 const std::string& opt_host,
64 const GetOriginsCallback& callback); 64 const GetOriginsCallback& callback);
65 void ProcessPendingRequests(); 65 void ProcessPendingRequests();
66 void DeletePendingRequests(); 66 void DeletePendingRequests();
67 const AppCacheStorage::UsageMap* GetUsageMap(); 67 const AppCacheStorage::UsageMap* GetUsageMap();
68 net::CancelableCompletionCallback* GetServiceDeleteCallback();
68 69
69 // For use by appcache internals during initialization and shutdown. 70 // For use by appcache internals during initialization and shutdown.
70 APPCACHE_EXPORT void NotifyAppCacheReady(); 71 APPCACHE_EXPORT void NotifyAppCacheReady();
71 APPCACHE_EXPORT void NotifyAppCacheDestroyed(); 72 APPCACHE_EXPORT void NotifyAppCacheDestroyed();
72 73
73 // Prior to appcache service being ready, we have to queue 74 // Prior to appcache service being ready, we have to queue
74 // up reqeusts and defer acting on them until we're ready. 75 // up reqeusts and defer acting on them until we're ready.
75 RequestQueue pending_batch_requests_; 76 RequestQueue pending_batch_requests_;
76 RequestQueue pending_serial_requests_; 77 RequestQueue pending_serial_requests_;
77 78
78 // And once it's ready, we can only handle one delete request at a time, 79 // And once it's ready, we can only handle one delete request at a time,
79 // so we queue up additional requests while one is in already in progress. 80 // so we queue up additional requests while one is in already in progress.
80 DeletionCallback current_delete_request_callback_; 81 DeletionCallback current_delete_request_callback_;
81 net::CancelableCompletionCallback service_delete_callback_; 82 scoped_ptr<net::CancelableCompletionCallback> service_delete_callback_;
82 83
83 AppCacheService* service_; 84 AppCacheService* service_;
84 bool appcache_is_ready_; 85 bool appcache_is_ready_;
85 bool quota_manager_is_destroyed_; 86 bool quota_manager_is_destroyed_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient); 88 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient);
88 }; 89 };
89 90
90 } // namespace appcache 91 } // namespace appcache
91 92
92 #endif // WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ 93 #endif // WEBKIT_APPCACHE_APPCACHE_QUOTA_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/appcache/appcache_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698