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

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

Issue 6727006: Select a more appropiate appcache based on the opener or the parent of the new document. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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_STORAGE_IMPL_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_
6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ 6 #define WEBKIT_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>
(...skipping 17 matching lines...) Expand all
28 base::MessageLoopProxy* cache_thread); 28 base::MessageLoopProxy* cache_thread);
29 void Disable(); 29 void Disable();
30 bool is_disabled() const { return is_disabled_; } 30 bool is_disabled() const { return is_disabled_; }
31 31
32 // AppCacheStorage methods, see the base class for doc comments. 32 // AppCacheStorage methods, see the base class for doc comments.
33 virtual void GetAllInfo(Delegate* delegate); 33 virtual void GetAllInfo(Delegate* delegate);
34 virtual void LoadCache(int64 id, Delegate* delegate); 34 virtual void LoadCache(int64 id, Delegate* delegate);
35 virtual void LoadOrCreateGroup(const GURL& manifest_url, Delegate* delegate); 35 virtual void LoadOrCreateGroup(const GURL& manifest_url, Delegate* delegate);
36 virtual void StoreGroupAndNewestCache( 36 virtual void StoreGroupAndNewestCache(
37 AppCacheGroup* group, AppCache* newest_cache, Delegate* delegate); 37 AppCacheGroup* group, AppCache* newest_cache, Delegate* delegate);
38 virtual void FindResponseForMainRequest(const GURL& url, Delegate* delegate); 38 virtual void FindResponseForMainRequest(
39 const GURL& url, const GURL& preferred_manifest_url, Delegate* delegate);
39 virtual void FindResponseForSubRequest( 40 virtual void FindResponseForSubRequest(
40 AppCache* cache, const GURL& url, 41 AppCache* cache, const GURL& url,
41 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, 42 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry,
42 bool* found_network_namespace); 43 bool* found_network_namespace);
43 virtual void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id); 44 virtual void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id);
44 virtual void MakeGroupObsolete(AppCacheGroup* group, Delegate* delegate); 45 virtual void MakeGroupObsolete(AppCacheGroup* group, Delegate* delegate);
45 virtual AppCacheResponseReader* CreateResponseReader( 46 virtual AppCacheResponseReader* CreateResponseReader(
46 const GURL& manifest_url, int64 response_id); 47 const GURL& manifest_url, int64 response_id);
47 virtual AppCacheResponseWriter* CreateResponseWriter( 48 virtual AppCacheResponseWriter* CreateResponseWriter(
48 const GURL& manifest_url); 49 const GURL& manifest_url);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 void DelayedStartDeletingUnusedResponses(); 96 void DelayedStartDeletingUnusedResponses();
96 void StartDeletingResponses(const std::vector<int64>& response_ids); 97 void StartDeletingResponses(const std::vector<int64>& response_ids);
97 void ScheduleDeleteOneResponse(); 98 void ScheduleDeleteOneResponse();
98 void DeleteOneResponse(); 99 void DeleteOneResponse();
99 100
100 void OnDeletedOneResponse(int rv); 101 void OnDeletedOneResponse(int rv);
101 void OnDiskCacheInitialized(int rv); 102 void OnDiskCacheInitialized(int rv);
102 103
103 // Sometimes we can respond without having to query the database. 104 // Sometimes we can respond without having to query the database.
105 bool FindResponseForMainRequestInGroup(
106 AppCacheGroup* group, const GURL& url, Delegate* delegate);
104 void DeliverShortCircuitedFindMainResponse( 107 void DeliverShortCircuitedFindMainResponse(
105 const GURL& url, AppCacheEntry found_entry, 108 const GURL& url, AppCacheEntry found_entry,
106 scoped_refptr<AppCacheGroup> group, scoped_refptr<AppCache> newest_cache, 109 scoped_refptr<AppCacheGroup> group, scoped_refptr<AppCache> newest_cache,
107 scoped_refptr<DelegateReference> delegate_ref); 110 scoped_refptr<DelegateReference> delegate_ref);
108 111
109 void CheckPolicyAndCallOnMainResponseFound( 112 void CheckPolicyAndCallOnMainResponseFound(
110 DelegateReferenceVector* delegates, 113 DelegateReferenceVector* delegates,
111 const GURL& url, const AppCacheEntry& entry, 114 const GURL& url, const AppCacheEntry& entry,
112 const GURL& fallback_url, const AppCacheEntry& fallback_entry, 115 const GURL& fallback_url, const AppCacheEntry& fallback_entry,
113 int64 cache_id, const GURL& manifest_url); 116 int64 cache_id, const GURL& manifest_url);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 std::deque<Task*> pending_simple_tasks_; 155 std::deque<Task*> pending_simple_tasks_;
153 ScopedRunnableMethodFactory<AppCacheStorageImpl> method_factory_; 156 ScopedRunnableMethodFactory<AppCacheStorageImpl> method_factory_;
154 157
155 FRIEND_TEST_ALL_PREFIXES(ChromeAppCacheServiceTest, KeepOnDestruction); 158 FRIEND_TEST_ALL_PREFIXES(ChromeAppCacheServiceTest, KeepOnDestruction);
156 FRIEND_TEST_ALL_PREFIXES(ChromeAppCacheServiceTest, RemoveOnDestruction); 159 FRIEND_TEST_ALL_PREFIXES(ChromeAppCacheServiceTest, RemoveOnDestruction);
157 }; 160 };
158 161
159 } // namespace appcache 162 } // namespace appcache
160 163
161 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ 164 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698