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

Side by Side Diff: net/url_request/view_cache_helper_unittest.cc

Issue 2681953002: Rename set_up_quic_server_info_factory to is_main_cache (Closed)
Patch Set: Created 3 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/url_request/url_request_unittest.cc ('k') | no next file » | 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 #include "net/url_request/view_cache_helper.h" 5 #include "net/url_request/view_cache_helper.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 20 matching lines...) Expand all
31 // Gets a pointer to the cache backend. 31 // Gets a pointer to the cache backend.
32 disk_cache::Backend* GetBackend(); 32 disk_cache::Backend* GetBackend();
33 33
34 private: 34 private:
35 HttpCache cache_; 35 HttpCache cache_;
36 }; 36 };
37 37
38 TestURLRequestContext::TestURLRequestContext() 38 TestURLRequestContext::TestURLRequestContext()
39 : cache_(base::MakeUnique<MockNetworkLayer>(), 39 : cache_(base::MakeUnique<MockNetworkLayer>(),
40 HttpCache::DefaultBackend::InMemory(0), 40 HttpCache::DefaultBackend::InMemory(0),
41 false /* set_up_quic_server_info */) { 41 false /* is_main_cache */) {
42 set_http_transaction_factory(&cache_); 42 set_http_transaction_factory(&cache_);
43 } 43 }
44 44
45 void WriteHeaders(disk_cache::Entry* entry, int flags, 45 void WriteHeaders(disk_cache::Entry* entry, int flags,
46 const std::string& data) { 46 const std::string& data) {
47 if (data.empty()) 47 if (data.empty())
48 return; 48 return;
49 49
50 base::Pickle pickle; 50 base::Pickle pickle;
51 pickle.WriteInt(flags | 1); // Version 1. 51 pickle.WriteInt(flags | 1); // Version 1.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 std::string data; 211 std::string data;
212 TestCompletionCallback cb1; 212 TestCompletionCallback cb1;
213 rv = helper.GetEntryInfoHTML(key, &context, &data, cb1.callback()); 213 rv = helper.GetEntryInfoHTML(key, &context, &data, cb1.callback());
214 EXPECT_THAT(cb1.GetResult(rv), IsOk()); 214 EXPECT_THAT(cb1.GetResult(rv), IsOk());
215 215
216 EXPECT_NE(std::string::npos, data.find("RESPONSE_INFO_TRUNCATED")); 216 EXPECT_NE(std::string::npos, data.find("RESPONSE_INFO_TRUNCATED"));
217 } 217 }
218 218
219 } // namespace net 219 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698