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

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

Issue 16870008: Revert a workaround commit for a UAF crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« 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/message_loop_proxy.h" 10 #include "base/message_loop/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 : load_time_stats_(load_time_stats) { 301 : weak_factory_(this),
302 load_time_stats_(load_time_stats) {
302 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
303 if (load_time_stats_) 304 if (load_time_stats_)
304 load_time_stats_->RegisterURLRequestContext(this, type); 305 load_time_stats_->RegisterURLRequestContext(this, type);
305 } 306 }
306 307
307 ChromeURLRequestContext::~ChromeURLRequestContext() { 308 ChromeURLRequestContext::~ChromeURLRequestContext() {
308 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 309 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
309 if (load_time_stats_) 310 if (load_time_stats_)
310 load_time_stats_->UnregisterURLRequestContext(this); 311 load_time_stats_->UnregisterURLRequestContext(this);
311 } 312 }
312 313
313 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) { 314 void ChromeURLRequestContext::CopyFrom(ChromeURLRequestContext* other) {
314 URLRequestContext::CopyFrom(other); 315 URLRequestContext::CopyFrom(other);
315 316
316 // Copy ChromeURLRequestContext parameters. 317 // Copy ChromeURLRequestContext parameters.
317 } 318 }
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