| OLD | NEW |
| 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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "base/trace_event/memory_dump_manager.h" | 46 #include "base/trace_event/memory_dump_manager.h" |
| 47 #include "base/trace_event/trace_event.h" | 47 #include "base/trace_event/trace_event.h" |
| 48 #include "build/build_config.h" | 48 #include "build/build_config.h" |
| 49 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" | 49 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
| 50 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 50 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 51 #include "components/tracing/common/trace_config_file.h" | 51 #include "components/tracing/common/trace_config_file.h" |
| 52 #include "components/tracing/common/trace_to_console.h" | 52 #include "components/tracing/common/trace_to_console.h" |
| 53 #include "components/tracing/common/tracing_switches.h" | 53 #include "components/tracing/common/tracing_switches.h" |
| 54 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" | 54 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
| 55 #include "content/browser/browser_thread_impl.h" | 55 #include "content/browser/browser_thread_impl.h" |
| 56 #include "content/browser/child_process_security_policy_impl.h" |
| 56 #include "content/browser/dom_storage/dom_storage_area.h" | 57 #include "content/browser/dom_storage/dom_storage_area.h" |
| 57 #include "content/browser/download/download_resource_handler.h" | 58 #include "content/browser/download/download_resource_handler.h" |
| 58 #include "content/browser/download/save_file_manager.h" | 59 #include "content/browser/download/save_file_manager.h" |
| 59 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 60 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 60 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 61 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 61 #include "content/browser/gpu/compositor_util.h" | 62 #include "content/browser/gpu/compositor_util.h" |
| 62 #include "content/browser/gpu/gpu_data_manager_impl.h" | 63 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 63 #include "content/browser/gpu/gpu_process_host.h" | 64 #include "content/browser/gpu/gpu_process_host.h" |
| 64 #include "content/browser/gpu/shader_cache_factory.h" | 65 #include "content/browser/gpu/shader_cache_factory.h" |
| 65 #include "content/browser/histogram_synchronizer.h" | 66 #include "content/browser/histogram_synchronizer.h" |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 } | 792 } |
| 792 | 793 |
| 793 if (parsed_command_line_.HasSwitch( | 794 if (parsed_command_line_.HasSwitch( |
| 794 switches::kEnableAggressiveDOMStorageFlushing)) { | 795 switches::kEnableAggressiveDOMStorageFlushing)) { |
| 795 TRACE_EVENT0("startup", | 796 TRACE_EVENT0("startup", |
| 796 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 797 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| 797 DOMStorageArea::EnableAggressiveCommitDelay(); | 798 DOMStorageArea::EnableAggressiveCommitDelay(); |
| 798 LevelDBWrapperImpl::EnableAggressiveCommitDelay(); | 799 LevelDBWrapperImpl::EnableAggressiveCommitDelay(); |
| 799 } | 800 } |
| 800 | 801 |
| 802 if (parsed_command_line_.HasSwitch(switches::kIsolateOrigins)) { |
| 803 ChildProcessSecurityPolicyImpl* policy = |
| 804 ChildProcessSecurityPolicyImpl::GetInstance(); |
| 805 policy->AddIsolatedOriginsFromCommandLine( |
| 806 parsed_command_line_.GetSwitchValueASCII(switches::kIsolateOrigins)); |
| 807 } |
| 808 |
| 801 // Enable memory-infra dump providers. | 809 // Enable memory-infra dump providers. |
| 802 InitSkiaEventTracer(); | 810 InitSkiaEventTracer(); |
| 803 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( | 811 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
| 804 base::kNullProcessId); | 812 base::kNullProcessId); |
| 805 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 813 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 806 viz::HostSharedBitmapManager::current(), "viz::HostSharedBitmapManager", | 814 viz::HostSharedBitmapManager::current(), "viz::HostSharedBitmapManager", |
| 807 nullptr); | 815 nullptr); |
| 808 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 816 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 809 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 817 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
| 810 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 818 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1779 base::MakeUnique<media::AudioThreadImpl>(), | 1787 base::MakeUnique<media::AudioThreadImpl>(), |
| 1780 MediaInternals::GetInstance()); | 1788 MediaInternals::GetInstance()); |
| 1781 } | 1789 } |
| 1782 CHECK(audio_manager_); | 1790 CHECK(audio_manager_); |
| 1783 | 1791 |
| 1784 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1792 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1785 CHECK(audio_system_); | 1793 CHECK(audio_system_); |
| 1786 } | 1794 } |
| 1787 | 1795 |
| 1788 } // namespace content | 1796 } // namespace content |
| OLD | NEW |