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

Side by Side Diff: content/browser/cache_storage/cache_storage_cache.h

Issue 1578363009: CacheStorage: Add ignoreSearch option to cache.matchAll(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, 70 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy,
71 base::WeakPtr<storage::BlobStorageContext> blob_context); 71 base::WeakPtr<storage::BlobStorageContext> blob_context);
72 72
73 // Returns ERROR_TYPE_NOT_FOUND if not found. 73 // Returns ERROR_TYPE_NOT_FOUND if not found.
74 void Match(scoped_ptr<ServiceWorkerFetchRequest> request, 74 void Match(scoped_ptr<ServiceWorkerFetchRequest> request,
75 const ResponseCallback& callback); 75 const ResponseCallback& callback);
76 76
77 // Returns CACHE_STORAGE_OK and all responses in this cache. If there are no 77 // Returns CACHE_STORAGE_OK and all responses in this cache. If there are no
78 // responses, returns CACHE_STORAGE_OK and an empty vector. 78 // responses, returns CACHE_STORAGE_OK and an empty vector.
79 void MatchAll(const ResponsesCallback& callback); 79 void MatchAll(const ResponsesCallback& callback);
80 void MatchAll(scoped_ptr<ServiceWorkerFetchRequest> request,
81 const ResponsesCallback& callback);
80 82
81 // Runs given batch operations. This corresponds to the Batch Cache Operations 83 // Runs given batch operations. This corresponds to the Batch Cache Operations
82 // algorithm in the spec. 84 // algorithm in the spec.
83 // 85 //
84 // |operations| cannot mix PUT and DELETE operations and cannot contain 86 // |operations| cannot mix PUT and DELETE operations and cannot contain
85 // multiple DELETE operations. 87 // multiple DELETE operations.
86 // 88 //
87 // In the case of the PUT operation, puts request and response objects in the 89 // In the case of the PUT operation, puts request and response objects in the
88 // cache and returns OK when all operations are successfully completed. 90 // cache and returns OK when all operations are successfully completed.
89 // In the case of the DELETE operation, returns ERROR_NOT_FOUND if a specified 91 // In the case of the DELETE operation, returns ERROR_NOT_FOUND if a specified
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void MatchDidOpenEntry(scoped_ptr<ServiceWorkerFetchRequest> request, 166 void MatchDidOpenEntry(scoped_ptr<ServiceWorkerFetchRequest> request,
165 const ResponseCallback& callback, 167 const ResponseCallback& callback,
166 scoped_ptr<disk_cache::Entry*> entry_ptr, 168 scoped_ptr<disk_cache::Entry*> entry_ptr,
167 int rv); 169 int rv);
168 void MatchDidReadMetadata(scoped_ptr<ServiceWorkerFetchRequest> request, 170 void MatchDidReadMetadata(scoped_ptr<ServiceWorkerFetchRequest> request,
169 const ResponseCallback& callback, 171 const ResponseCallback& callback,
170 disk_cache::ScopedEntryPtr entry, 172 disk_cache::ScopedEntryPtr entry,
171 scoped_ptr<CacheMetadata> headers); 173 scoped_ptr<CacheMetadata> headers);
172 174
173 // MatchAll callbacks 175 // MatchAll callbacks
174 void MatchAllImpl(const ResponsesCallback& callback); 176 void MatchAllImpl(scoped_ptr<ServiceWorkerFetchRequest> request,
177 const ResponsesCallback& callback);
175 void MatchAllDidOpenAllEntries( 178 void MatchAllDidOpenAllEntries(
179 scoped_ptr<ServiceWorkerFetchRequest> request,
176 const ResponsesCallback& callback, 180 const ResponsesCallback& callback,
177 scoped_ptr<OpenAllEntriesContext> entries_context, 181 scoped_ptr<OpenAllEntriesContext> entries_context,
178 CacheStorageError error); 182 CacheStorageError error);
179 void MatchAllProcessNextEntry(scoped_ptr<MatchAllContext> context, 183 void MatchAllProcessNextEntry(scoped_ptr<MatchAllContext> context,
180 const Entries::iterator& iter); 184 const Entries::iterator& iter);
181 void MatchAllDidReadMetadata(scoped_ptr<MatchAllContext> context, 185 void MatchAllDidReadMetadata(scoped_ptr<MatchAllContext> context,
182 const Entries::iterator& iter, 186 const Entries::iterator& iter,
183 scoped_ptr<CacheMetadata> metadata); 187 scoped_ptr<CacheMetadata> metadata);
184 188
185 // Puts the request and response object in the cache. The response body (if 189 // Puts the request and response object in the cache. The response body (if
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 bool memory_only_; 282 bool memory_only_;
279 283
280 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_; 284 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_;
281 285
282 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache); 286 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache);
283 }; 287 };
284 288
285 } // namespace content 289 } // namespace content
286 290
287 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ 291 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698