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

Side by Side Diff: chrome/browser/net/preconnect.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 "chrome/browser/net/preconnect.h" 5 #include "chrome/browser/net/preconnect.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 15 matching lines...) Expand all
26 void PreconnectOnUIThread( 26 void PreconnectOnUIThread(
27 const GURL& url, 27 const GURL& url,
28 const GURL& first_party_for_cookies, 28 const GURL& first_party_for_cookies,
29 UrlInfo::ResolutionMotivation motivation, 29 UrlInfo::ResolutionMotivation motivation,
30 int count, 30 int count,
31 net::URLRequestContextGetter* getter) { 31 net::URLRequestContextGetter* getter) {
32 // Prewarm connection to Search URL. 32 // Prewarm connection to Search URL.
33 BrowserThread::PostTask( 33 BrowserThread::PostTask(
34 BrowserThread::IO, FROM_HERE, 34 BrowserThread::IO, FROM_HERE,
35 base::Bind(&PreconnectOnIOThread, url, first_party_for_cookies, 35 base::Bind(&PreconnectOnIOThread, url, first_party_for_cookies,
36 motivation, count, make_scoped_refptr(getter), true)); 36 motivation, count, base::RetainedRef(getter), true));
37 return; 37 return;
38 } 38 }
39 39
40 void PreconnectOnIOThread(const GURL& url, 40 void PreconnectOnIOThread(const GURL& url,
41 const GURL& first_party_for_cookies, 41 const GURL& first_party_for_cookies,
42 UrlInfo::ResolutionMotivation motivation, 42 UrlInfo::ResolutionMotivation motivation,
43 int count, 43 int count,
44 net::URLRequestContextGetter* getter, 44 net::URLRequestContextGetter* getter,
45 bool allow_credentials) { 45 bool allow_credentials) {
46 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 46 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // All preconnects should perform EV certificate verification. 109 // All preconnects should perform EV certificate verification.
110 ssl_config.verify_ev_cert = true; 110 ssl_config.verify_ev_cert = true;
111 111
112 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); 112 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory();
113 http_stream_factory->PreconnectStreams(count, request_info, ssl_config, 113 http_stream_factory->PreconnectStreams(count, request_info, ssl_config,
114 ssl_config); 114 ssl_config);
115 } 115 }
116 116
117 } // namespace chrome_browser_net 117 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc ('k') | chrome/browser/net/sdch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698