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

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

Issue 7863009: Replace ancient crufty AppCacheThread with much improved MessageLoopProxy usage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
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_SERVICE_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_SERVICE_H_
6 #define WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ 6 #define WEBKIT_APPCACHE_APPCACHE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Class that manages the application cache service. Sends notifications 50 // Class that manages the application cache service. Sends notifications
51 // to many frontends. One instance per user-profile. Each instance has 51 // to many frontends. One instance per user-profile. Each instance has
52 // exclusive access to it's cache_directory on disk. 52 // exclusive access to it's cache_directory on disk.
53 class AppCacheService { 53 class AppCacheService {
54 public: 54 public:
55 // If not using quota management, the proxy may be NULL. 55 // If not using quota management, the proxy may be NULL.
56 explicit AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy); 56 explicit AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy);
57 virtual ~AppCacheService(); 57 virtual ~AppCacheService();
58 58
59 void Initialize(const FilePath& cache_directory, 59 void Initialize(const FilePath& cache_directory,
60 base::MessageLoopProxy* db_thread,
60 base::MessageLoopProxy* cache_thread); 61 base::MessageLoopProxy* cache_thread);
61 62
62 // Purges any memory not needed. 63 // Purges any memory not needed.
63 void PurgeMemory() { 64 void PurgeMemory() {
64 if (storage_.get()) 65 if (storage_.get())
65 storage_->PurgeMemory(); 66 storage_->PurgeMemory();
66 } 67 }
67 68
68 // Determines if a request for 'url' can be satisfied while offline. 69 // Determines if a request for 'url' can be satisfied while offline.
69 // This method always completes asynchronously. 70 // This method always completes asynchronously.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Context for use during cache updates. 167 // Context for use during cache updates.
167 net::URLRequestContext* request_context_; 168 net::URLRequestContext* request_context_;
168 bool clear_local_state_on_exit_; 169 bool clear_local_state_on_exit_;
169 170
170 DISALLOW_COPY_AND_ASSIGN(AppCacheService); 171 DISALLOW_COPY_AND_ASSIGN(AppCacheService);
171 }; 172 };
172 173
173 } // namespace appcache 174 } // namespace appcache
174 175
175 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ 176 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698