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

Unified Diff: chrome/browser/debugger/devtools_netlog_observer.cc

Issue 4118004: Update NetLog to be thread safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/debugger/devtools_netlog_observer.cc
===================================================================
--- chrome/browser/debugger/devtools_netlog_observer.cc (revision 65207)
+++ chrome/browser/debugger/devtools_netlog_observer.cc (working copy)
@@ -41,6 +41,10 @@
const net::NetLog::Source& source,
net::NetLog::EventPhase phase,
net::NetLog::EventParameters* params) {
+ // The events that the Observer is interested in only occur on the IO thread.
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO))
+ return;
+
if (type == net::NetLog::TYPE_URL_REQUEST_START_JOB) {
if (phase != net::NetLog::PHASE_BEGIN)
return;
@@ -100,7 +104,7 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!instance_);
- instance_ = new DevToolsNetLogObserver(io_thread->globals()->net_log.get());
+ instance_ = new DevToolsNetLogObserver(io_thread->net_log());
}
void DevToolsNetLogObserver::Detach() {

Powered by Google App Engine
This is Rietveld 408576698