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

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

Issue 303293002: Initialize the bootstrap sandbox in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename constant Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 #if defined(OS_ANDROID) 79 #if defined(OS_ANDROID)
80 #include "base/android/jni_android.h" 80 #include "base/android/jni_android.h"
81 #include "content/browser/android/browser_startup_controller.h" 81 #include "content/browser/android/browser_startup_controller.h"
82 #include "content/browser/android/surface_texture_peer_browser_impl.h" 82 #include "content/browser/android/surface_texture_peer_browser_impl.h"
83 #include "content/browser/android/tracing_controller_android.h" 83 #include "content/browser/android/tracing_controller_android.h"
84 #include "ui/gl/gl_surface.h" 84 #include "ui/gl/gl_surface.h"
85 #endif 85 #endif
86 86
87 #if defined(OS_MACOSX) && !defined(OS_IOS) 87 #if defined(OS_MACOSX) && !defined(OS_IOS)
88 #include "content/browser/bootstrap_sandbox_mac.h"
88 #include "content/browser/theme_helper_mac.h" 89 #include "content/browser/theme_helper_mac.h"
89 #endif 90 #endif
90 91
91 #if defined(OS_WIN) 92 #if defined(OS_WIN)
92 #include <windows.h> 93 #include <windows.h>
93 #include <commctrl.h> 94 #include <commctrl.h>
94 #include <shellapi.h> 95 #include <shellapi.h>
95 96
96 #include "content/browser/system_message_window_win.h" 97 #include "content/browser/system_message_window_win.h"
97 #include "content/common/sandbox_win.h" 98 #include "content/common/sandbox_win.h"
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 TRACE_EVENT_SCOPE_THREAD); 1032 TRACE_EVENT_SCOPE_THREAD);
1032 BrowserThread::PostTask( 1033 BrowserThread::PostTask(
1033 BrowserThread::IO, FROM_HERE, base::Bind( 1034 BrowserThread::IO, FROM_HERE, base::Bind(
1034 base::IgnoreResult(&GpuProcessHost::Get), 1035 base::IgnoreResult(&GpuProcessHost::Get),
1035 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, 1036 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
1036 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); 1037 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP));
1037 } 1038 }
1038 1039
1039 #if defined(OS_MACOSX) 1040 #if defined(OS_MACOSX)
1040 ThemeHelperMac::GetInstance(); 1041 ThemeHelperMac::GetInstance();
1041 #endif 1042 if (ShouldEnableBootstrapSandbox()) {
1043 TRACE_EVENT0("startup",
1044 "BrowserMainLoop::BrowserThreadsStarted:BootstrapSandbox");
1045 CHECK(GetBootstrapSandbox());
1046 }
1047 #endif // defined(OS_MACOSX)
1048
1042 #endif // !defined(OS_IOS) 1049 #endif // !defined(OS_IOS)
1043 1050
1044 return result_code_; 1051 return result_code_;
1045 } 1052 }
1046 1053
1047 bool BrowserMainLoop::InitializeToolkit() { 1054 bool BrowserMainLoop::InitializeToolkit() {
1048 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit"); 1055 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit");
1049 // TODO(evan): this function is rather subtle, due to the variety 1056 // TODO(evan): this function is rather subtle, due to the variety
1050 // of intersecting ifdefs we have. To keep it easy to follow, there 1057 // of intersecting ifdefs we have. To keep it easy to follow, there
1051 // are no #else branches on any #ifs. 1058 // are no #else branches on any #ifs.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 base::TimeDelta::FromSeconds(delay_secs)); 1144 base::TimeDelta::FromSeconds(delay_secs));
1138 } 1145 }
1139 1146
1140 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1147 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1141 is_tracing_startup_ = false; 1148 is_tracing_startup_ = false;
1142 TracingController::GetInstance()->DisableRecording( 1149 TracingController::GetInstance()->DisableRecording(
1143 trace_file, base::Bind(&OnStoppedStartupTracing)); 1150 trace_file, base::Bind(&OnStoppedStartupTracing));
1144 } 1151 }
1145 1152
1146 } // namespace content 1153 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698