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

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

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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
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/url_request_context.h" 5 #include "net/url_request/url_request_context.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return NULL; 72 return NULL;
73 HttpNetworkSession* network_session = transaction_factory->GetSession(); 73 HttpNetworkSession* network_session = transaction_factory->GetSession();
74 if (!network_session) 74 if (!network_session)
75 return NULL; 75 return NULL;
76 return &network_session->params(); 76 return &network_session->params();
77 } 77 }
78 78
79 scoped_ptr<URLRequest> URLRequestContext::CreateRequest( 79 scoped_ptr<URLRequest> URLRequestContext::CreateRequest(
80 const GURL& url, 80 const GURL& url,
81 RequestPriority priority, 81 RequestPriority priority,
82 URLRequest::Delegate* delegate, 82 URLRequest::Delegate* delegate) const {
83 CookieStore* cookie_store) const { 83 return make_scoped_ptr(
84 return scoped_ptr<URLRequest>( 84 new URLRequest(url, priority, delegate, this, network_delegate_));
85 new URLRequest(url, priority, delegate, this, cookie_store,
86 network_delegate_));
87 } 85 }
88 86
89 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { 87 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) {
90 cookie_store_ = cookie_store; 88 cookie_store_ = cookie_store;
91 } 89 }
92 90
93 void URLRequestContext::AssertNoURLRequests() const { 91 void URLRequestContext::AssertNoURLRequests() const {
94 int num_requests = url_requests_->size(); 92 int num_requests = url_requests_->size();
95 if (num_requests != 0) { 93 if (num_requests != 0) {
96 // We're leaking URLRequests :( Dump the URL of the first one and record how 94 // We're leaking URLRequests :( Dump the URL of the first one and record how
(...skipping 10 matching lines...) Expand all
107 base::debug::Alias(&num_requests); 105 base::debug::Alias(&num_requests);
108 base::debug::Alias(&has_delegate); 106 base::debug::Alias(&has_delegate);
109 base::debug::Alias(&load_flags); 107 base::debug::Alias(&load_flags);
110 base::debug::Alias(&stack_trace); 108 base::debug::Alias(&stack_trace);
111 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " 109 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
112 << request->url().spec().c_str() << "."; 110 << request->url().spec().c_str() << ".";
113 } 111 }
114 } 112 }
115 113
116 } // namespace net 114 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_context_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698