| 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "content/common/content_constants_internal.h" | 25 #include "content/common/content_constants_internal.h" |
| 26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
| 27 #include "content/public/common/main_function_params.h" | 27 #include "content/public/common/main_function_params.h" |
| 28 #include "content/public/renderer/content_renderer_client.h" | 28 #include "content/public/renderer/content_renderer_client.h" |
| 29 #include "content/renderer/render_process_impl.h" | 29 #include "content/renderer/render_process_impl.h" |
| 30 #include "content/renderer/render_thread_impl.h" | 30 #include "content/renderer/render_thread_impl.h" |
| 31 #include "content/renderer/renderer_main_platform_delegate.h" | 31 #include "content/renderer/renderer_main_platform_delegate.h" |
| 32 #include "ui/base/ui_base_switches.h" | 32 #include "ui/base/ui_base_switches.h" |
| 33 | 33 |
| 34 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
| 35 #include "base/android/library_loader/library_loader_hooks.h" |
| 35 #include "third_party/skia/include/core/SkGraphics.h" | 36 #include "third_party/skia/include/core/SkGraphics.h" |
| 36 #endif // OS_ANDROID | 37 #endif // OS_ANDROID |
| 37 | 38 |
| 38 #if defined(OS_MACOSX) | 39 #if defined(OS_MACOSX) |
| 39 #include <Carbon/Carbon.h> | 40 #include <Carbon/Carbon.h> |
| 40 #include <signal.h> | 41 #include <signal.h> |
| 41 #include <unistd.h> | 42 #include <unistd.h> |
| 42 | 43 |
| 43 #include "base/mac/mac_util.h" | 44 #include "base/mac/mac_util.h" |
| 44 #include "base/mac/scoped_nsautorelease_pool.h" | 45 #include "base/mac/scoped_nsautorelease_pool.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 #endif | 156 #endif |
| 156 main_message_loop.AddTaskObserver(&task_observer); | 157 main_message_loop.AddTaskObserver(&task_observer); |
| 157 | 158 |
| 158 base::PlatformThread::SetName("CrRendererMain"); | 159 base::PlatformThread::SetName("CrRendererMain"); |
| 159 | 160 |
| 160 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); | 161 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); |
| 161 | 162 |
| 162 // Initialize histogram statistics gathering system. | 163 // Initialize histogram statistics gathering system. |
| 163 base::StatisticsRecorder::Initialize(); | 164 base::StatisticsRecorder::Initialize(); |
| 164 | 165 |
| 166 #if defined(OS_ANDROID) |
| 167 // If we have a pending chromium android linker histogram, record it. |
| 168 base::android::RecordChromiumAndroidLinkerRendererHistogram(); |
| 169 #endif |
| 170 |
| 165 // Initialize statistical testing infrastructure. We set the entropy provider | 171 // Initialize statistical testing infrastructure. We set the entropy provider |
| 166 // to NULL to disallow the renderer process from creating its own one-time | 172 // to NULL to disallow the renderer process from creating its own one-time |
| 167 // randomized trials; they should be created in the browser process. | 173 // randomized trials; they should be created in the browser process. |
| 168 base::FieldTrialList field_trial_list(NULL); | 174 base::FieldTrialList field_trial_list(NULL); |
| 169 // Ensure any field trials in browser are reflected into renderer. | 175 // Ensure any field trials in browser are reflected into renderer. |
| 170 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { | 176 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
| 171 // Field trials are created in an "activated" state to ensure they get | 177 // Field trials are created in an "activated" state to ensure they get |
| 172 // reported in crash reports. | 178 // reported in crash reports. |
| 173 bool result = base::FieldTrialList::CreateTrialsFromString( | 179 bool result = base::FieldTrialList::CreateTrialsFromString( |
| 174 parsed_command_line.GetSwitchValueASCII(switches::kForceFieldTrials), | 180 parsed_command_line.GetSwitchValueASCII(switches::kForceFieldTrials), |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 base::MessageLoop::current()->Run(); | 235 base::MessageLoop::current()->Run(); |
| 230 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 236 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 231 } | 237 } |
| 232 } | 238 } |
| 233 platform.PlatformUninitialize(); | 239 platform.PlatformUninitialize(); |
| 234 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 240 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
| 235 return 0; | 241 return 0; |
| 236 } | 242 } |
| 237 | 243 |
| 238 } // namespace content | 244 } // namespace content |
| OLD | NEW |