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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | chrome/browser/net/predictor.cc » ('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 #include "chrome/browser/net/preconnect.h" 5 #include "chrome/browser/net/preconnect.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "net/base/net_log.h" 11 #include "net/base/net_log.h"
12 #include "net/base/ssl_config_service.h" 12 #include "net/base/ssl_config_service.h"
13 #include "net/http/http_network_session.h" 13 #include "net/http/http_network_session.h"
14 #include "net/http/http_request_info.h" 14 #include "net/http/http_request_info.h"
15 #include "net/http/http_stream_factory.h" 15 #include "net/http/http_stream_factory.h"
16 #include "net/http/http_transaction_factory.h" 16 #include "net/http/http_transaction_factory.h"
17 #include "net/url_request/url_request_context.h" 17 #include "net/url_request/url_request_context.h"
18 #include "net/url_request/url_request_context_getter.h" 18 #include "net/url_request/url_request_context_getter.h"
19 19
20 using content::BrowserThread;
21
20 namespace chrome_browser_net { 22 namespace chrome_browser_net {
21 23
22 void PreconnectOnUIThread( 24 void PreconnectOnUIThread(
23 const GURL& url, 25 const GURL& url,
24 UrlInfo::ResolutionMotivation motivation, 26 UrlInfo::ResolutionMotivation motivation,
25 int count) { 27 int count) {
26 // Prewarm connection to Search URL. 28 // Prewarm connection to Search URL.
27 BrowserThread::PostTask( 29 BrowserThread::PostTask(
28 BrowserThread::IO, 30 BrowserThread::IO,
29 FROM_HERE, 31 FROM_HERE,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 101
100 // All preconnects should perform EV certificate verification. 102 // All preconnects should perform EV certificate verification.
101 ssl_config.verify_ev_cert = true; 103 ssl_config.verify_ev_cert = true;
102 104
103 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); 105 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory();
104 http_stream_factory->PreconnectStreams( 106 http_stream_factory->PreconnectStreams(
105 count, request_info, ssl_config, ssl_config, net::BoundNetLog()); 107 count, request_info, ssl_config, ssl_config, net::BoundNetLog());
106 } 108 }
107 109
108 } // namespace chrome_browser_net 110 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698