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

Side by Side Diff: net/http/http_cache.h

Issue 2970133002: DoomPartialEntry should not attempt to doom an already doomed entry. (Closed)
Patch Set: Test and test framework changes added. Created 3 years, 5 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
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_cache_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file declares a HttpTransactionFactory implementation that can be 5 // This file declares a HttpTransactionFactory implementation that can be
6 // layered on top of another HttpTransactionFactory to add HTTP caching. The 6 // layered on top of another HttpTransactionFactory to add HTTP caching. The
7 // caching logic follows RFC 7234 (any exceptions are called out in the code). 7 // caching logic follows RFC 7234 (any exceptions are called out in the code).
8 // 8 //
9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for 9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for
10 // the cache storage. 10 // the cache storage.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // Generates the cache key for this request. 335 // Generates the cache key for this request.
336 std::string GenerateCacheKey(const HttpRequestInfo*); 336 std::string GenerateCacheKey(const HttpRequestInfo*);
337 337
338 // Dooms the entry selected by |key|, if it is currently in the list of active 338 // Dooms the entry selected by |key|, if it is currently in the list of active
339 // entries. 339 // entries.
340 void DoomActiveEntry(const std::string& key); 340 void DoomActiveEntry(const std::string& key);
341 341
342 // Dooms the entry selected by |key|. |trans| will be notified via its IO 342 // Dooms the entry selected by |key|. |trans| will be notified via its IO
343 // callback if this method returns ERR_IO_PENDING. The entry can be 343 // callback if this method returns ERR_IO_PENDING. The entry can be
344 // currently in use or not. 344 // currently in use or not. If entry is in use and the invoking transaction
345 // is associated with this entry and this entry is already doomed, this API
346 // should not be invoked.
345 int DoomEntry(const std::string& key, Transaction* trans); 347 int DoomEntry(const std::string& key, Transaction* trans);
346 348
347 // Dooms the entry selected by |key|. |trans| will be notified via its IO 349 // Dooms the entry selected by |key|. |trans| will be notified via its IO
348 // callback if this method returns ERR_IO_PENDING. The entry should not 350 // callback if this method returns ERR_IO_PENDING. The entry should not
349 // be currently in use. 351 // be currently in use.
350 int AsyncDoomEntry(const std::string& key, Transaction* trans); 352 int AsyncDoomEntry(const std::string& key, Transaction* trans);
351 353
352 // Dooms the entry associated with a GET for a given |url|. 354 // Dooms the entry associated with a GET for a given |url|.
353 void DoomMainEntryForUrl(const GURL& url); 355 void DoomMainEntryForUrl(const GURL& url);
354 356
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 THREAD_CHECKER(thread_checker_); 548 THREAD_CHECKER(thread_checker_);
547 549
548 base::WeakPtrFactory<HttpCache> weak_factory_; 550 base::WeakPtrFactory<HttpCache> weak_factory_;
549 551
550 DISALLOW_COPY_AND_ASSIGN(HttpCache); 552 DISALLOW_COPY_AND_ASSIGN(HttpCache);
551 }; 553 };
552 554
553 } // namespace net 555 } // namespace net
554 556
555 #endif // NET_HTTP_HTTP_CACHE_H_ 557 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_cache_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698