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