OLD | NEW |
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 HttpCache::Transaction, a private class of HttpCache so | 5 // This file declares HttpCache::Transaction, a private class of HttpCache so |
6 // it should only be included by http_cache.cc | 6 // it should only be included by http_cache.cc |
7 | 7 |
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // Generates a failure when attempting to conditionalize a network request. | 131 // Generates a failure when attempting to conditionalize a network request. |
132 void FailConditionalizationForTest() { | 132 void FailConditionalizationForTest() { |
133 fail_conditionalization_for_test_ = true; | 133 fail_conditionalization_for_test_ = true; |
134 } | 134 } |
135 | 135 |
136 // HttpTransaction methods: | 136 // HttpTransaction methods: |
137 int Start(const HttpRequestInfo* request_info, | 137 int Start(const HttpRequestInfo* request_info, |
138 const CompletionCallback& callback, | 138 const CompletionCallback& callback, |
139 const NetLogWithSource& net_log) override; | 139 const NetLogWithSource& net_log) override; |
140 int RestartIgnoringLastError(const CompletionCallback& callback) override; | 140 int RestartIgnoringLastError(const CompletionCallback& callback) override; |
141 int RestartWithCertificate(X509Certificate* client_cert, | 141 int RestartWithCertificate(scoped_refptr<X509Certificate> client_cert, |
142 SSLPrivateKey* client_private_key, | 142 scoped_refptr<SSLPrivateKey> client_private_key, |
143 const CompletionCallback& callback) override; | 143 const CompletionCallback& callback) override; |
144 int RestartWithAuth(const AuthCredentials& credentials, | 144 int RestartWithAuth(const AuthCredentials& credentials, |
145 const CompletionCallback& callback) override; | 145 const CompletionCallback& callback) override; |
146 bool IsReadyToRestartForAuth() override; | 146 bool IsReadyToRestartForAuth() override; |
147 int Read(IOBuffer* buf, | 147 int Read(IOBuffer* buf, |
148 int buf_len, | 148 int buf_len, |
149 const CompletionCallback& callback) override; | 149 const CompletionCallback& callback) override; |
150 void StopCaching() override; | 150 void StopCaching() override; |
151 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; | 151 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; |
152 int64_t GetTotalReceivedBytes() const override; | 152 int64_t GetTotalReceivedBytes() const override; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // conditionalized internally in response to LOAD_VALIDATE_CACHE). | 346 // conditionalized internally in response to LOAD_VALIDATE_CACHE). |
347 // Returns a network error code. | 347 // Returns a network error code. |
348 int BeginExternallyConditionalizedRequest(); | 348 int BeginExternallyConditionalizedRequest(); |
349 | 349 |
350 // Called to restart a network transaction after an error. Returns network | 350 // Called to restart a network transaction after an error. Returns network |
351 // error code. | 351 // error code. |
352 int RestartNetworkRequest(); | 352 int RestartNetworkRequest(); |
353 | 353 |
354 // Called to restart a network transaction with a client certificate. | 354 // Called to restart a network transaction with a client certificate. |
355 // Returns network error code. | 355 // Returns network error code. |
356 int RestartNetworkRequestWithCertificate(X509Certificate* client_cert, | 356 int RestartNetworkRequestWithCertificate( |
357 SSLPrivateKey* client_private_key); | 357 scoped_refptr<X509Certificate> client_cert, |
| 358 scoped_refptr<SSLPrivateKey> client_private_key); |
358 | 359 |
359 // Called to restart a network transaction with authentication credentials. | 360 // Called to restart a network transaction with authentication credentials. |
360 // Returns network error code. | 361 // Returns network error code. |
361 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials); | 362 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials); |
362 | 363 |
363 // Called to determine if we need to validate the cache entry before using it. | 364 // Called to determine if we need to validate the cache entry before using it. |
364 bool RequiresValidation(); | 365 bool RequiresValidation(); |
365 | 366 |
366 // Called to make the request conditional (to ask the server if the cached | 367 // Called to make the request conditional (to ask the server if the cached |
367 // copy is valid). Returns true if able to make the request conditional. | 368 // copy is valid). Returns true if able to make the request conditional. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 RestartInfo restart_info_; | 550 RestartInfo restart_info_; |
550 | 551 |
551 base::WeakPtrFactory<Transaction> weak_factory_; | 552 base::WeakPtrFactory<Transaction> weak_factory_; |
552 | 553 |
553 DISALLOW_COPY_AND_ASSIGN(Transaction); | 554 DISALLOW_COPY_AND_ASSIGN(Transaction); |
554 }; | 555 }; |
555 | 556 |
556 } // namespace net | 557 } // namespace net |
557 | 558 |
558 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 559 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |