diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 11:40:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 12:42:11 +0000 |
commit | 5d87695f37678f96492b258bbab36486c59866b4 (patch) | |
tree | be9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/content/browser/browser_main_runner_impl.cc | |
parent | 6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff) | |
download | qtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz |
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/content/browser/browser_main_runner_impl.cc')
-rw-r--r-- | chromium/content/browser/browser_main_runner_impl.cc | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/chromium/content/browser/browser_main_runner_impl.cc b/chromium/content/browser/browser_main_runner_impl.cc index 5e6c0fff5d4..28e6d582c17 100644 --- a/chromium/content/browser/browser_main_runner_impl.cc +++ b/chromium/content/browser/browser_main_runner_impl.cc @@ -23,13 +23,13 @@ #include "components/tracing/common/trace_startup_config.h" #include "components/tracing/common/tracing_switches.h" #include "content/browser/browser_main_loop.h" -#include "content/browser/browser_shutdown_profile_dumper.h" #include "content/browser/notification_service_impl.h" +#include "content/browser/tracing/tracing_controller_impl.h" #include "content/common/content_switches_internal.h" #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "third_party/skia/include/core/SkGraphics.h" -#include "ui/base/ime/input_method_initializer.h" +#include "ui/base/ime/init/input_method_initializer.h" #if defined(OS_ANDROID) #include "content/browser/android/tracing_controller_android.h" @@ -57,7 +57,7 @@ BrowserMainRunnerImpl::BrowserMainRunnerImpl() : initialization_started_(false), is_shutdown_(false), scoped_execution_fence_( - std::make_unique<base::TaskScheduler::ScopedExecutionFence>()) {} + std::make_unique<base::ThreadPool::ScopedExecutionFence>()) {} BrowserMainRunnerImpl::~BrowserMainRunnerImpl() { if (initialization_started_ && !is_shutdown_) @@ -106,8 +106,7 @@ int BrowserMainRunnerImpl::Initialize(const MainFunctionParams& parameters) { // (Text Services Framework) module can interact with the message pump // on Windows 8 Metro mode. ole_initializer_.reset(new ui::ScopedOleInitializer); - // Enable DirectWrite font rendering if needed. - gfx::win::MaybeInitializeDirectWrite(); + gfx::win::InitializeDirectWrite(); #endif // OS_WIN main_loop_.reset( @@ -181,37 +180,8 @@ void BrowserMainRunnerImpl::Shutdown() { main_loop_->PreShutdown(); - // If startup tracing has not been finished yet, replace it's dumper - // with special version, which would save trace file on exit (i.e. - // startup tracing becomes a version of shutdown tracing). - // There are two cases: - // 1. Startup duration is not reached. - // 2. Or if the trace should be saved to file for --trace-config-file flag. - std::unique_ptr<BrowserShutdownProfileDumper> startup_profiler; - if (tracing::TraceStartupConfig::GetInstance() - ->IsTracingStartupForDuration()) { - main_loop_->StopStartupTracingTimer(); - if (main_loop_->startup_trace_file() != - base::FilePath().AppendASCII("none")) { - startup_profiler.reset( - new BrowserShutdownProfileDumper(main_loop_->startup_trace_file())); - } - } else if (tracing::TraceStartupConfig::GetInstance() - ->ShouldTraceToResultFile()) { - base::FilePath result_file = main_loop_->GetStartupTraceFileName(); - startup_profiler.reset(new BrowserShutdownProfileDumper(result_file)); - } - - // The shutdown tracing got enabled in AttemptUserExit earlier, but someone - // needs to write the result to disc. For that a dumper needs to get created - // which will dump the traces to disc when it gets destroyed. - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - std::unique_ptr<BrowserShutdownProfileDumper> shutdown_profiler; - if (command_line.HasSwitch(switches::kTraceShutdown)) { - shutdown_profiler.reset(new BrowserShutdownProfileDumper( - BrowserShutdownProfileDumper::GetShutdownProfileFileName())); - } + // Finalize the startup tracing session if it is still active. + TracingControllerImpl::GetInstance()->FinalizeStartupTracingIfNeeded(); { // The trace event has to stay between profiler creation and destruction. |