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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 379293002: Add AssertNoURLRequests() to URLRequestContext subclass destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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/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
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();
Ryan Sleevi 2014/07/10 16:49:19 Seems like this should go second, right? After al
Johnny 2014/07/10 16:58:28 That'd be a violation of the URLRequestContext lif
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | net/url_request/url_request_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698