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

Side by Side Diff: content/browser/appcache/appcache_storage_impl.h

Issue 344493002: Move all remaining appcache-related code to content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/message_loop/message_loop_proxy.h" 17 #include "base/message_loop/message_loop_proxy.h"
18 #include "webkit/browser/appcache/appcache_database.h" 18 #include "content/browser/appcache/appcache_database.h"
19 #include "webkit/browser/appcache/appcache_disk_cache.h" 19 #include "content/browser/appcache/appcache_disk_cache.h"
20 #include "webkit/browser/appcache/appcache_storage.h" 20 #include "content/browser/appcache/appcache_storage.h"
21 #include "webkit/browser/webkit_storage_browser_export.h" 21 #include "content/common/content_export.h"
22 22
23 namespace content { 23 namespace content {
24 class AppCacheStorageImplTest; 24 class AppCacheStorageImplTest;
25 class ChromeAppCacheServiceTest; 25 class ChromeAppCacheServiceTest;
26 } 26 }
27 27
28 namespace appcache { 28 namespace content {
29 29
30 class AppCacheStorageImpl : public AppCacheStorage { 30 class AppCacheStorageImpl : public AppCacheStorage {
31 public: 31 public:
32 explicit AppCacheStorageImpl(AppCacheServiceImpl* service); 32 explicit AppCacheStorageImpl(AppCacheServiceImpl* service);
33 virtual ~AppCacheStorageImpl(); 33 virtual ~AppCacheStorageImpl();
34 34
35 void Initialize(const base::FilePath& cache_directory, 35 void Initialize(const base::FilePath& cache_directory,
36 base::MessageLoopProxy* db_thread, 36 base::MessageLoopProxy* db_thread,
37 base::MessageLoopProxy* cache_thread); 37 base::MessageLoopProxy* cache_thread);
38 void Disable(); 38 void Disable();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_refptr<AppCacheGroup> group, 125 scoped_refptr<AppCacheGroup> group,
126 scoped_refptr<AppCache> newest_cache, 126 scoped_refptr<AppCache> newest_cache,
127 scoped_refptr<DelegateReference> delegate_ref); 127 scoped_refptr<DelegateReference> delegate_ref);
128 128
129 void CallOnMainResponseFound( 129 void CallOnMainResponseFound(
130 DelegateReferenceVector* delegates, 130 DelegateReferenceVector* delegates,
131 const GURL& url, const AppCacheEntry& entry, 131 const GURL& url, const AppCacheEntry& entry,
132 const GURL& namespace_entry_url, const AppCacheEntry& fallback_entry, 132 const GURL& namespace_entry_url, const AppCacheEntry& fallback_entry,
133 int64 cache_id, int64 group_id, const GURL& manifest_url); 133 int64 cache_id, int64 group_id, const GURL& manifest_url);
134 134
135 WEBKIT_STORAGE_BROWSER_EXPORT AppCacheDiskCache* disk_cache(); 135 CONTENT_EXPORT AppCacheDiskCache* disk_cache();
136 136
137 // The directory in which we place files in the file system. 137 // The directory in which we place files in the file system.
138 base::FilePath cache_directory_; 138 base::FilePath cache_directory_;
139 bool is_incognito_; 139 bool is_incognito_;
140 140
141 // This class operates primarily on the IO thread, but schedules 141 // This class operates primarily on the IO thread, but schedules
142 // its DatabaseTasks on the db thread. Separately, the disk_cache uses 142 // its DatabaseTasks on the db thread. Separately, the disk_cache uses
143 // the cache_thread. 143 // the cache_thread.
144 scoped_refptr<base::MessageLoopProxy> db_thread_; 144 scoped_refptr<base::MessageLoopProxy> db_thread_;
145 scoped_refptr<base::MessageLoopProxy> cache_thread_; 145 scoped_refptr<base::MessageLoopProxy> cache_thread_;
(...skipping 23 matching lines...) Expand all
169 169
170 // Used to short-circuit certain operations without having to schedule 170 // Used to short-circuit certain operations without having to schedule
171 // any tasks on the background database thread. 171 // any tasks on the background database thread.
172 std::deque<base::Closure> pending_simple_tasks_; 172 std::deque<base::Closure> pending_simple_tasks_;
173 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_; 173 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_;
174 174
175 friend class content::AppCacheStorageImplTest; 175 friend class content::AppCacheStorageImplTest;
176 friend class content::ChromeAppCacheServiceTest; 176 friend class content::ChromeAppCacheServiceTest;
177 }; 177 };
178 178
179 } // namespace appcache 179 } // namespace content
180 180
181 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ 181 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698