| OLD | NEW |
| 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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 class SystemURLRequestContext : public net::URLRequestContext { | 152 class SystemURLRequestContext : public net::URLRequestContext { |
| 153 public: | 153 public: |
| 154 SystemURLRequestContext() { | 154 SystemURLRequestContext() { |
| 155 #if defined(USE_NSS) || defined(OS_IOS) | 155 #if defined(USE_NSS) || defined(OS_IOS) |
| 156 net::SetURLRequestContextForNSSHttpIO(this); | 156 net::SetURLRequestContextForNSSHttpIO(this); |
| 157 #endif | 157 #endif |
| 158 } | 158 } |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 virtual ~SystemURLRequestContext() { | 161 virtual ~SystemURLRequestContext() { |
| 162 AssertNoURLRequests(); |
| 162 #if defined(USE_NSS) || defined(OS_IOS) | 163 #if defined(USE_NSS) || defined(OS_IOS) |
| 163 net::SetURLRequestContextForNSSHttpIO(NULL); | 164 net::SetURLRequestContextForNSSHttpIO(NULL); |
| 164 #endif | 165 #endif |
| 165 } | 166 } |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 scoped_ptr<net::HostResolver> CreateGlobalHostResolver(net::NetLog* net_log) { | 169 scoped_ptr<net::HostResolver> CreateGlobalHostResolver(net::NetLog* net_log) { |
| 169 TRACE_EVENT0("startup", "IOThread::CreateGlobalHostResolver"); | 170 TRACE_EVENT0("startup", "IOThread::CreateGlobalHostResolver"); |
| 170 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 171 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 171 | 172 |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1368 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1368 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1369 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1369 net::QuicVersion version = supported_versions[i]; | 1370 net::QuicVersion version = supported_versions[i]; |
| 1370 if (net::QuicVersionToString(version) == quic_version) { | 1371 if (net::QuicVersionToString(version) == quic_version) { |
| 1371 return version; | 1372 return version; |
| 1372 } | 1373 } |
| 1373 } | 1374 } |
| 1374 | 1375 |
| 1375 return net::QUIC_VERSION_UNSUPPORTED; | 1376 return net::QUIC_VERSION_UNSUPPORTED; |
| 1376 } | 1377 } |
| OLD | NEW |