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

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

Issue 344493002: Move all remaining appcache-related code to content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 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 WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_H_
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "content/browser/appcache/appcache_database.h"
16 #include "content/browser/appcache/appcache_entry.h"
17 #include "content/browser/appcache/manifest_parser.h"
18 #include "content/common/content_export.h"
15 #include "url/gurl.h" 19 #include "url/gurl.h"
16 #include "webkit/browser/appcache/appcache_database.h"
17 #include "webkit/browser/appcache/appcache_entry.h"
18 #include "webkit/browser/appcache/manifest_parser.h"
19 #include "webkit/browser/webkit_storage_browser_export.h"
20 20
21 namespace net { 21 namespace net {
22 class IOBuffer; 22 class IOBuffer;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 FORWARD_DECLARE_TEST(AppCacheTest, InitializeWithManifest); 26 FORWARD_DECLARE_TEST(AppCacheTest, InitializeWithManifest);
27 FORWARD_DECLARE_TEST(AppCacheTest, ToFromDatabaseRecords); 27 FORWARD_DECLARE_TEST(AppCacheTest, ToFromDatabaseRecords);
28 class AppCacheTest; 28 class AppCacheTest;
29 class AppCacheStorageImplTest; 29 class AppCacheStorageImplTest;
30 class AppCacheUpdateJobTest; 30 class AppCacheUpdateJobTest;
31 } 31 }
32 32
33 namespace appcache { 33 namespace content {
34 34
35 class AppCacheExecutableHandler; 35 class AppCacheExecutableHandler;
36 class AppCacheGroup; 36 class AppCacheGroup;
37 class AppCacheHost; 37 class AppCacheHost;
38 class AppCacheStorage; 38 class AppCacheStorage;
39 39
40 // Set of cached resources for an application. A cache exists as long as a 40 // Set of cached resources for an application. A cache exists as long as a
41 // host is associated with it, the cache is in an appcache group or the 41 // host is associated with it, the cache is in an appcache group or the
42 // cache is being created during an appcache upate. 42 // cache is being created during an appcache upate.
43 class WEBKIT_STORAGE_BROWSER_EXPORT AppCache 43 class CONTENT_EXPORT AppCache
44 : public base::RefCounted<AppCache> { 44 : public base::RefCounted<AppCache> {
45 public: 45 public:
46 typedef std::map<GURL, AppCacheEntry> EntryMap; 46 typedef std::map<GURL, AppCacheEntry> EntryMap;
47 typedef std::set<AppCacheHost*> AppCacheHosts; 47 typedef std::set<AppCacheHost*> AppCacheHosts;
48 48
49 AppCache(AppCacheStorage* storage, int64 cache_id); 49 AppCache(AppCacheStorage* storage, int64 cache_id);
50 50
51 int64 cache_id() const { return cache_id_; } 51 int64 cache_id() const { return cache_id_; }
52 52
53 AppCacheGroup* owning_group() const { return owning_group_.get(); } 53 AppCacheGroup* owning_group() const { return owning_group_.get(); }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 HandlerMap executable_handlers_; 202 HandlerMap executable_handlers_;
203 203
204 // to notify storage when cache is deleted 204 // to notify storage when cache is deleted
205 AppCacheStorage* storage_; 205 AppCacheStorage* storage_;
206 206
207 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, InitializeWithManifest); 207 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, InitializeWithManifest);
208 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, ToFromDatabaseRecords); 208 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, ToFromDatabaseRecords);
209 DISALLOW_COPY_AND_ASSIGN(AppCache); 209 DISALLOW_COPY_AND_ASSIGN(AppCache);
210 }; 210 };
211 211
212 } // namespace appcache 212 } // namespace content
213 213
214 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ 214 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698