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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2831683002: Introduce support for origins that require process isolation. (Closed)
Patch Set: Rebase Created 3 years, 7 months 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 unified diff | Download patch
OLDNEW
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
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/display_compositor/host_shared_bitmap_manager.h" 50 #include "components/display_compositor/host_shared_bitmap_manager.h"
51 #include "components/tracing/common/process_metrics_memory_dump_provider.h" 51 #include "components/tracing/common/process_metrics_memory_dump_provider.h"
52 #include "components/tracing/common/trace_config_file.h" 52 #include "components/tracing/common/trace_config_file.h"
53 #include "components/tracing/common/trace_to_console.h" 53 #include "components/tracing/common/trace_to_console.h"
54 #include "components/tracing/common/tracing_switches.h" 54 #include "components/tracing/common/tracing_switches.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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } 791 }
791 792
792 if (parsed_command_line_.HasSwitch( 793 if (parsed_command_line_.HasSwitch(
793 switches::kEnableAggressiveDOMStorageFlushing)) { 794 switches::kEnableAggressiveDOMStorageFlushing)) {
794 TRACE_EVENT0("startup", 795 TRACE_EVENT0("startup",
795 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); 796 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay");
796 DOMStorageArea::EnableAggressiveCommitDelay(); 797 DOMStorageArea::EnableAggressiveCommitDelay();
797 LevelDBWrapperImpl::EnableAggressiveCommitDelay(); 798 LevelDBWrapperImpl::EnableAggressiveCommitDelay();
798 } 799 }
799 800
801 if (parsed_command_line_.HasSwitch(switches::kIsolateOrigins)) {
802 ChildProcessSecurityPolicyImpl* policy =
803 ChildProcessSecurityPolicyImpl::GetInstance();
804 policy->AddIsolatedOriginsFromCommandLine(
805 parsed_command_line_.GetSwitchValueASCII(switches::kIsolateOrigins));
806 }
807
800 // Create the memory instrumentation service. It will initialize the memory 808 // Create the memory instrumentation service. It will initialize the memory
801 // dump manager, too. It makes sense that BrowserMainLoop owns the service; 809 // dump manager, too. It makes sense that BrowserMainLoop owns the service;
802 // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown 810 // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown
803 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. 811 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
804 memory_instrumentation_coordinator_ = 812 memory_instrumentation_coordinator_ =
805 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( 813 base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
806 true /* initialize_memory_dump_manager */); 814 true /* initialize_memory_dump_manager */);
807 815
808 // Enable memory-infra dump providers. 816 // Enable memory-infra dump providers.
809 InitSkiaEventTracer(); 817 InitSkiaEventTracer();
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1783 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1776 MediaInternals::GetInstance()); 1784 MediaInternals::GetInstance());
1777 } 1785 }
1778 CHECK(audio_manager_); 1786 CHECK(audio_manager_);
1779 1787
1780 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1788 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1781 CHECK(audio_system_); 1789 CHECK(audio_system_);
1782 } 1790 }
1783 1791
1784 } // namespace content 1792 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698