| Index: content/browser/loader/loader_globals.cc
|
| diff --git a/content/browser/loader/loader_globals.cc b/content/browser/loader/loader_globals.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5cb949de9173fa6404a809633ed1782cc55960d3
|
| --- /dev/null
|
| +++ b/content/browser/loader/loader_globals.cc
|
| @@ -0,0 +1,34 @@
|
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/loader/loader_globals.h"
|
| +#include "base/logging.h"
|
| +
|
| +namespace content {
|
| +
|
| +namespace {
|
| +
|
| +static LoaderGlobals* g_loader_globals;
|
| +
|
| +} // namespace
|
| +
|
| +// static
|
| +LoaderGlobals* LoaderGlobals::Get() {
|
| + return g_loader_globals;
|
| +}
|
| +
|
| +LoaderGlobals::LoaderGlobals(
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_runner,
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_runner)
|
| + : main_thread_task_runner_(main_thread_runner),
|
| + io_thread_task_runner_(io_thread_runner) {
|
| + DCHECK(!g_loader_globals);
|
| + g_loader_globals = this;
|
| +}
|
| +
|
| +LoaderGlobals::~LoaderGlobals() {
|
| + g_loader_globals = NULL;
|
| +}
|
| +
|
| +} // namespace content
|
|
|