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

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

Issue 280763003: Rename http_transaction_unittest to http_transaction_test_util. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/http/http_transaction_unittest.cc ('k') | net/net.gyp » ('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) 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 // This is a mock of the http cache and related testing classes. To be fair, it 5 // This is a mock of the http cache and related testing classes. To be fair, it
6 // is not really a mock http cache given that it uses the real implementation of 6 // is not really a mock http cache given that it uses the real implementation of
7 // the http cache, but it has fake implementations of all required components, 7 // the http cache, but it has fake implementations of all required components,
8 // so it is useful for unit tests at the http layer. 8 // so it is useful for unit tests at the http layer.
9 9
10 #ifndef NET_HTTP_MOCK_HTTP_CACHE_H_ 10 #ifndef NET_HTTP_MOCK_HTTP_CACHE_H_
11 #define NET_HTTP_MOCK_HTTP_CACHE_H_ 11 #define NET_HTTP_MOCK_HTTP_CACHE_H_
12 12
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "net/disk_cache/disk_cache.h" 14 #include "net/disk_cache/disk_cache.h"
15 #include "net/http/http_cache.h" 15 #include "net/http/http_cache.h"
16 #include "net/http/http_transaction_unittest.h" 16 #include "net/http/http_transaction_test_util.h"
17 17
18 //----------------------------------------------------------------------------- 18 //-----------------------------------------------------------------------------
19 // Mock disk cache (a very basic memory cache implementation). 19 // Mock disk cache (a very basic memory cache implementation).
20 20
21 class MockDiskEntry : public disk_cache::Entry, 21 class MockDiskEntry : public disk_cache::Entry,
22 public base::RefCounted<MockDiskEntry> { 22 public base::RefCounted<MockDiskEntry> {
23 public: 23 public:
24 explicit MockDiskEntry(const std::string& key); 24 explicit MockDiskEntry(const std::string& key);
25 25
26 bool is_doomed() const { return doomed_; } 26 bool is_doomed() const { return doomed_; }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 private: 241 private:
242 int Result() { return fail_ ? net::ERR_FAILED : net::OK; } 242 int Result() { return fail_ ? net::ERR_FAILED : net::OK; }
243 243
244 scoped_ptr<disk_cache::Backend>* backend_; 244 scoped_ptr<disk_cache::Backend>* backend_;
245 net::CompletionCallback callback_; 245 net::CompletionCallback callback_;
246 bool block_; 246 bool block_;
247 bool fail_; 247 bool fail_;
248 }; 248 };
249 249
250 #endif // NET_HTTP_MOCK_HTTP_CACHE_H_ 250 #endif // NET_HTTP_MOCK_HTTP_CACHE_H_
OLDNEW
« no previous file with comments | « net/http/http_transaction_unittest.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698