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

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

Issue 1953593002: Move DevToolsNetLogObserver to c/b/loader and create stub of network service interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 2016 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/network_service_interface.h"
6
7 #include "base/lazy_instance.h"
8 #include "content/browser/loader/netlog_observer.h"
9 #include "content/public/browser/browser_thread.h"
10
11 namespace content {
12
13 namespace {
14
15 NetworkServiceInterface* g_instance;
16
17 } // namespace
18
19 NetworkServiceInterface::NetworkServiceInterface() {}
20
21 // static
22 NetworkServiceInterface* NetworkServiceInterface::GetInstance() {
23 static base::LazyInstance<NetworkServiceInterface>::Leaky instance;
24 return instance.Pointer();
25 }
26
27 void NetworkServiceInterface::EnableNetLogObserver() {
28 // TODO(scottmg): This should probably keep track of a count.
29 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
30 base::Bind(&NetLogObserver::Attach));
31 }
32
33 void NetworkServiceInterface::DisableNetLogObserver() {
34 // TODO(scottmg): This should probably keep track of a count.
35 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
36 base::Bind(&NetLogObserver::Detach));
37 }
38
39 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698