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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « net/ftp/ftp_network_transaction_unittest.cc ('k') | net/http/http_cache.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 2616 (any exceptions are called out in the code). 7 // caching logic follows RFC 2616 (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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 static bool ParseResponseInfo(const char* data, int len, 171 static bool ParseResponseInfo(const char* data, int len,
172 HttpResponseInfo* response_info, 172 HttpResponseInfo* response_info,
173 bool* response_truncated); 173 bool* response_truncated);
174 174
175 // Writes |buf_len| bytes of metadata stored in |buf| to the cache entry 175 // Writes |buf_len| bytes of metadata stored in |buf| to the cache entry
176 // referenced by |url|, as long as the entry's |expected_response_time| has 176 // referenced by |url|, as long as the entry's |expected_response_time| has
177 // not changed. This method returns without blocking, and the operation will 177 // not changed. This method returns without blocking, and the operation will
178 // be performed asynchronously without any completion notification. 178 // be performed asynchronously without any completion notification.
179 void WriteMetadata(const GURL& url, 179 void WriteMetadata(const GURL& url,
180 RequestPriority priority, 180 RequestPriority priority,
181 base::Time expected_response_time, 181 double expected_response_time,
182 IOBuffer* buf, 182 IOBuffer* buf,
183 int buf_len); 183 int buf_len);
184 184
185 // Get/Set the cache's mode. 185 // Get/Set the cache's mode.
186 void set_mode(Mode value) { mode_ = value; } 186 void set_mode(Mode value) { mode_ = value; }
187 Mode mode() { return mode_; } 187 Mode mode() { return mode_; }
188 188
189 // Get/Set the cache's clock. These are public only for testing. 189 // Get/Set the cache's clock. These are public only for testing.
190 void SetClockForTesting(scoped_ptr<base::Clock> clock) { 190 void SetClockForTesting(scoped_ptr<base::Clock> clock) {
191 clock_.reset(clock.release()); 191 clock_.reset(clock.release());
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 scoped_ptr<base::Clock> clock_; 477 scoped_ptr<base::Clock> clock_;
478 478
479 base::WeakPtrFactory<HttpCache> weak_factory_; 479 base::WeakPtrFactory<HttpCache> weak_factory_;
480 480
481 DISALLOW_COPY_AND_ASSIGN(HttpCache); 481 DISALLOW_COPY_AND_ASSIGN(HttpCache);
482 }; 482 };
483 483
484 } // namespace net 484 } // namespace net
485 485
486 #endif // NET_HTTP_HTTP_CACHE_H_ 486 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction_unittest.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698