| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "net/http/http_transaction.h" | 9 #include "net/http/http_transaction.h" |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 net::CompletionCallback* callback); | 175 net::CompletionCallback* callback); |
| 176 | 176 |
| 177 virtual void StopCaching(); | 177 virtual void StopCaching(); |
| 178 | 178 |
| 179 virtual const net::HttpResponseInfo* GetResponseInfo() const; | 179 virtual const net::HttpResponseInfo* GetResponseInfo() const; |
| 180 | 180 |
| 181 virtual net::LoadState GetLoadState() const; | 181 virtual net::LoadState GetLoadState() const; |
| 182 | 182 |
| 183 virtual uint64 GetUploadProgress() const; | 183 virtual uint64 GetUploadProgress() const; |
| 184 | 184 |
| 185 virtual void UpdateRankForExternalCacheHit(); |
| 186 |
| 185 private: | 187 private: |
| 186 void CallbackLater(net::CompletionCallback* callback, int result); | 188 void CallbackLater(net::CompletionCallback* callback, int result); |
| 187 void RunCallback(net::CompletionCallback* callback, int result); | 189 void RunCallback(net::CompletionCallback* callback, int result); |
| 188 | 190 |
| 189 ScopedRunnableMethodFactory<MockNetworkTransaction> task_factory_; | 191 ScopedRunnableMethodFactory<MockNetworkTransaction> task_factory_; |
| 190 net::HttpResponseInfo response_; | 192 net::HttpResponseInfo response_; |
| 191 std::string data_; | 193 std::string data_; |
| 192 int data_cursor_; | 194 int data_cursor_; |
| 193 int test_mode_; | 195 int test_mode_; |
| 194 }; | 196 }; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 209 int transaction_count_; | 211 int transaction_count_; |
| 210 }; | 212 }; |
| 211 | 213 |
| 212 //----------------------------------------------------------------------------- | 214 //----------------------------------------------------------------------------- |
| 213 // helpers | 215 // helpers |
| 214 | 216 |
| 215 // read the transaction completely | 217 // read the transaction completely |
| 216 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 218 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 217 | 219 |
| 218 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 220 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| OLD | NEW |