From b2fcd0e0c8850eda2135b6fe270af5f453682f23 Mon Sep 17 00:00:00 2001 From: "mmenke@chromium.org" Date: Wed, 1 Dec 2010 15:19:40 +0000 Subject: Update NetLog to be threadsafe. The ChromeNetLog is now owned by the browser process, and passed to the IOThread on creation. NetLog entries can be added from any thread. Observers must be able to handle having log entries added from any thread. Observers can add/remove themselves on any thread. BUG=63334 TEST=None, yet Review URL: http://codereview.chromium.org/4118004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67851 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_process_impl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/browser_process_impl.h') diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 0aeb976..4cfab10 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -24,6 +24,7 @@ #include "chrome/browser/tab_contents/thumbnail_generator.h" #include "ipc/ipc_message.h" +class ChromeNetLog; class CommandLine; class DebuggerWrapper; class FilePath; @@ -211,6 +212,9 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { // notifications are properly added and removed. PrefChangeRegistrar pref_change_registrar_; + // Lives here so can safely log events on shutdown. + scoped_ptr net_log_; + #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) base::RepeatingTimer autoupdate_timer_; -- cgit v1.1