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

Side by Side Diff: remoting/host/vlog_net_log.cc

Issue 10069020: Log Gaia response codes to ease diagnostics of networking issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/vlog_net_log.h"
6
7 #include "base/json/json_writer.h"
8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h"
11 #include "base/threading/thread_restrictions.h"
12 #include "base/values.h"
13
14 namespace remoting {
15
16 VlogNetLog::VlogNetLog() : id_(0) {
17 }
18
19 VlogNetLog::~VlogNetLog() {
20 }
21
22 void VlogNetLog::AddEntry(
23 EventType type,
24 const Source& source,
25 EventPhase phase,
26 const scoped_refptr<EventParameters>& params) {
27 if (VLOG_IS_ON(4)) {
28 scoped_ptr<Value> value(
29 net::NetLog::EntryToDictionaryValue(
30 type, base::TimeTicks::Now(), source, phase, params, false));
31 std::string json;
32 base::JSONWriter::Write(value.get(), &json);
33 VLOG(4) << json;
34 }
35 }
36
37 uint32 VlogNetLog::NextID() {
38 return id_++;
39 }
40
41 net::NetLog::LogLevel VlogNetLog::GetLogLevel() const {
42 return LOG_ALL_BUT_BYTES;
43 }
44
45 void VlogNetLog::AddThreadSafeObserver(ThreadSafeObserver* observer,
46 net::NetLog::LogLevel log_level) {
47 NOTIMPLEMENTED();
48 }
49
50 void VlogNetLog::SetObserverLogLevel(ThreadSafeObserver* observer,
51 net::NetLog::LogLevel log_level) {
52 NOTIMPLEMENTED();
53 }
54
55 void VlogNetLog::RemoveThreadSafeObserver(ThreadSafeObserver* observer) {
56 NOTIMPLEMENTED();
57 }
58
59 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698