diff options
author | Primiano Tucci <primiano@google.com> | 2014-09-30 14:45:55 +0100 |
---|---|---|
committer | Primiano Tucci <primiano@google.com> | 2014-09-30 14:45:55 +0100 |
commit | 1320f92c476a1ad9d19dba2a48c72b75566198e9 (patch) | |
tree | ea7f149ccad687b22c18a72b729646568b2d54fb /content/browser/browser_main_loop.cc | |
parent | 39b78c562f50ad7d5551ee861121f899239525a2 (diff) | |
download | chromium_org-1320f92c476a1ad9d19dba2a48c72b75566198e9.tar.gz |
Merge from Chromium at DEPS revision 267aeeb8d85c
This commit was generated by merge_to_master.py.
Change-Id: Id3aac9713b301fae64408cdaee0888724eeb7c0e
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r-- | content/browser/browser_main_loop.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index d2a642ca65..d9bfded9f2 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/debug/trace_event.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" #include "base/metrics/field_trial.h" @@ -35,10 +34,8 @@ #include "content/browser/gpu/gpu_process_host_ui_shim.h" #include "content/browser/histogram_synchronizer.h" #include "content/browser/loader/resource_dispatcher_host_impl.h" -#include "content/browser/media/capture/audio_mirroring_manager.h" #include "content/browser/media/media_internals.h" #include "content/browser/net/browser_online_state_observer.h" -#include "content/browser/plugin_service_impl.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/speech/speech_recognition_manager_impl.h" #include "content/browser/startup_task_runner.h" @@ -117,6 +114,10 @@ #include "sandbox/linux/suid/client/setuid_sandbox_client.h" #endif +#if defined(ENABLE_PLUGINS) +#include "content/browser/plugin_service_impl.h" +#endif + #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" #endif @@ -329,7 +330,7 @@ class BrowserMainLoop::MemoryObserver : public base::MessageLoop::TaskObserver { #endif size_t private_bytes; process_metrics->GetMemoryBytes(&private_bytes, NULL); - HISTOGRAM_MEMORY_KB("Memory.BrowserUsed", private_bytes >> 10); + LOCAL_HISTOGRAM_MEMORY_KB("Memory.BrowserUsed", private_bytes >> 10); #endif } private: @@ -507,10 +508,6 @@ void BrowserMainLoop::MainMessageLoopStart() { } { - TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMirroringManager"); - audio_mirroring_manager_.reset(new AudioMirroringManager()); - } - { TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:OnlineStateObserver"); online_state_observer_.reset(new BrowserOnlineStateObserver); } @@ -718,7 +715,9 @@ int BrowserMainLoop::CreateThreads() { if (thread_to_start) { (*thread_to_start).reset(new BrowserProcessSubThread(id)); - (*thread_to_start)->StartWithOptions(options); + if (!(*thread_to_start)->StartWithOptions(options)) { + LOG(FATAL) << "Failed to start the browser thread: id == " << id; + } } else { NOTREACHED(); } @@ -1008,8 +1007,7 @@ int BrowserMainLoop::BrowserThreadsStarted() { ImageTransportFactory::Initialize(); #if defined(USE_AURA) if (aura::Env::GetInstance()) { - aura::Env::GetInstance()->set_context_factory( - content::GetContextFactory()); + aura::Env::GetInstance()->set_context_factory(GetContextFactory()); } #endif } @@ -1200,7 +1198,9 @@ void BrowserMainLoop::InitStartupTracing( void BrowserMainLoop::EndStartupTracing() { is_tracing_startup_ = false; TracingController::GetInstance()->DisableRecording( - startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); + TracingController::CreateFileSink( + startup_trace_file_, + base::Bind(OnStoppedStartupTracing, startup_trace_file_))); } } // namespace content |