Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: content/browser/loader/loader_globals.cc

Issue 2785523002: Reduce/remove usage of BrowserThread in content/browser/loader. (Closed)
Patch Set: Fix unittests redness Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/loader/loader_globals.h"
6 #include "base/logging.h"
7
8 namespace content {
9
10 namespace {
11
12 static LoaderGlobals* g_loader_globals;
13
14 } // namespace
15
16 // static
17 LoaderGlobals* LoaderGlobals::Get() {
18 return g_loader_globals;
19 }
20
21 LoaderGlobals::LoaderGlobals(
22 const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_runner,
23 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_runner)
24 : main_thread_task_runner_(main_thread_runner),
25 io_thread_task_runner_(io_thread_runner) {
26 DCHECK(!g_loader_globals);
27 g_loader_globals = this;
28 }
29
30 LoaderGlobals::~LoaderGlobals() {
31 g_loader_globals = NULL;
32 }
33
34 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698