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/public/browser/browser_main_runner.h" | 5 #include "content/public/browser/browser_main_runner.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/leak_annotations.h" | 9 #include "base/debug/leak_annotations.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if (main_loop_->is_tracing_startup_for_duration()) { | 257 if (main_loop_->is_tracing_startup_for_duration()) { |
258 main_loop_->StopStartupTracingTimer(); | 258 main_loop_->StopStartupTracingTimer(); |
259 if (main_loop_->startup_trace_file() != | 259 if (main_loop_->startup_trace_file() != |
260 base::FilePath().AppendASCII("none")) { | 260 base::FilePath().AppendASCII("none")) { |
261 startup_profiler.reset( | 261 startup_profiler.reset( |
262 new BrowserShutdownProfileDumper(main_loop_->startup_trace_file())); | 262 new BrowserShutdownProfileDumper(main_loop_->startup_trace_file())); |
263 } | 263 } |
264 } else if (tracing::TraceConfigFile::GetInstance()->IsEnabled() && | 264 } else if (tracing::TraceConfigFile::GetInstance()->IsEnabled() && |
265 TracingController::GetInstance()->IsRecording()) { | 265 TracingController::GetInstance()->IsRecording()) { |
266 base::FilePath result_file; | 266 base::FilePath result_file; |
267 #if defined(OS_ANDROID) | 267 #if defined(OS_ANDROID) && !defined(USE_AURA) |
268 TracingControllerAndroid::GenerateTracingFilePath(&result_file); | 268 TracingControllerAndroid::GenerateTracingFilePath(&result_file); |
269 #else | 269 #else |
270 result_file = tracing::TraceConfigFile::GetInstance()->GetResultFile(); | 270 result_file = tracing::TraceConfigFile::GetInstance()->GetResultFile(); |
271 #endif | 271 #endif |
272 startup_profiler.reset(new BrowserShutdownProfileDumper(result_file)); | 272 startup_profiler.reset(new BrowserShutdownProfileDumper(result_file)); |
273 } | 273 } |
274 | 274 |
275 // The shutdown tracing got enabled in AttemptUserExit earlier, but someone | 275 // The shutdown tracing got enabled in AttemptUserExit earlier, but someone |
276 // needs to write the result to disc. For that a dumper needs to get created | 276 // needs to write the result to disc. For that a dumper needs to get created |
277 // which will dump the traces to disc when it gets destroyed. | 277 // which will dump the traces to disc when it gets destroyed. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 BrowserMainRunner* BrowserMainRunner::Create() { | 330 BrowserMainRunner* BrowserMainRunner::Create() { |
331 return new BrowserMainRunnerImpl(); | 331 return new BrowserMainRunnerImpl(); |
332 } | 332 } |
333 | 333 |
334 // static | 334 // static |
335 bool BrowserMainRunner::ExitedMainMessageLoop() { | 335 bool BrowserMainRunner::ExitedMainMessageLoop() { |
336 return g_exited_main_message_loop; | 336 return g_exited_main_message_loop; |
337 } | 337 } |
338 | 338 |
339 } // namespace content | 339 } // namespace content |
OLD | NEW |