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

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

Issue 16874005: Merge r205158 (SocketStream uses a weak ptr to URLRequestContext) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.h ('k') | net/socket_stream/socket_stream.h » ('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) 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/chrome_url_request_context.h" 5 #include "chrome/browser/net/chrome_url_request_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 protocol_handlers)); 291 protocol_handlers));
292 } 292 }
293 293
294 // ---------------------------------------------------------------------------- 294 // ----------------------------------------------------------------------------
295 // ChromeURLRequestContext 295 // ChromeURLRequestContext
296 // ---------------------------------------------------------------------------- 296 // ----------------------------------------------------------------------------
297 297
298 ChromeURLRequestContext::ChromeURLRequestContext( 298 ChromeURLRequestContext::ChromeURLRequestContext(
299 ContextType type, 299 ContextType type,
300 chrome_browser_net::LoadTimeStats* load_time_stats) 300 chrome_browser_net::LoadTimeStats* load_time_stats)
301 : weak_factory_(this), 301 : load_time_stats_(load_time_stats) {
302 load_time_stats_(load_time_stats) {
303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 302 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
304 if (load_time_stats_) 303 if (load_time_stats_)
305 load_time_stats_->RegisterURLRequestContext(this, type); 304 load_time_stats_->RegisterURLRequestContext(this, type);
306 } 305 }
307 306
308 ChromeURLRequestContext::~ChromeURLRequestContext() { 307 ChromeURLRequestContext::~ChromeURLRequestContext() {
309 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 308 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
310 if (load_time_stats_) 309 if (load_time_stats_)
311 load_time_stats_->UnregisterURLRequestContext(this); 310 load_time_stats_->UnregisterURLRequestContext(this);
312 } 311 }
313 312
314 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) { 313 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) {
315 URLRequestContext::CopyFrom(other); 314 URLRequestContext::CopyFrom(other);
316 315
317 // Copy ChromeURLRequestContext parameters. 316 // Copy ChromeURLRequestContext parameters.
318 } 317 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.h ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698