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

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

Issue 2970133002: DoomPartialEntry should not attempt to doom an already doomed entry. (Closed)
Patch Set: Feedback addressed 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') | no next file with comments »
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 THREAD_CHECKER(thread_checker_); 552 THREAD_CHECKER(thread_checker_);
551 553
552 base::WeakPtrFactory<HttpCache> weak_factory_; 554 base::WeakPtrFactory<HttpCache> weak_factory_;
553 555
554 DISALLOW_COPY_AND_ASSIGN(HttpCache); 556 DISALLOW_COPY_AND_ASSIGN(HttpCache);
555 }; 557 };
556 558
557 } // namespace net 559 } // namespace net
558 560
559 #endif // NET_HTTP_HTTP_CACHE_H_ 561 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698