diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 15:19:40 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 15:19:40 +0000 |
commit | b2fcd0e0c8850eda2135b6fe270af5f453682f23 (patch) | |
tree | 2858497a3551d59093a5dfd233bf3550d40a4e8d /chrome/browser/browser_process_impl.cc | |
parent | 087a03f6aeded6397081304e191b1ac027b8e134 (diff) | |
download | chromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.zip chromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.tar.gz chromium_src-b2fcd0e0c8850eda2135b6fe270af5f453682f23.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 44f459b..f281667 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -32,6 +32,7 @@ #include "chrome/browser/intranet_redirect_detector.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/metrics/metrics_service.h" +#include "chrome/browser/net/chrome_net_log.h" #include "chrome/browser/net/predictor_api.h" #include "chrome/browser/net/sdch_dictionary_fetcher.h" #include "chrome/browser/net/sqlite_persistent_cookie_store.h" @@ -111,6 +112,8 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) print_job_manager_.reset(new printing::PrintJobManager); shutdown_event_.reset(new base::WaitableEvent(true, false)); + + net_log_.reset(new ChromeNetLog); } BrowserProcessImpl::~BrowserProcessImpl() { @@ -562,7 +565,7 @@ void BrowserProcessImpl::CreateIOThread() { background_x11_thread_.swap(background_x11_thread); #endif - scoped_ptr<IOThread> thread(new IOThread(local_state())); + scoped_ptr<IOThread> thread(new IOThread(local_state(), net_log_.get())); base::Thread::Options options; options.message_loop_type = MessageLoop::TYPE_IO; if (!thread->StartWithOptions(options)) |