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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/vlog_net_log.cc
diff --git a/remoting/host/vlog_net_log.cc b/remoting/host/vlog_net_log.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f273b0924f4c1936bf917b2134c79494c482fbe8
--- /dev/null
+++ b/remoting/host/vlog_net_log.cc
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 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 "remoting/host/vlog_net_log.h"
+
+#include "base/json/json_writer.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
+#include "base/threading/thread_restrictions.h"
+#include "base/values.h"
+
+namespace remoting {
+
+VlogNetLog::VlogNetLog() : id_(0) {
+}
+
+VlogNetLog::~VlogNetLog() {
+}
+
+void VlogNetLog::AddEntry(
+ EventType type,
+ const Source& source,
+ EventPhase phase,
+ const scoped_refptr<EventParameters>& params) {
+ if (VLOG_IS_ON(4)) {
+ scoped_ptr<Value> value(
+ net::NetLog::EntryToDictionaryValue(
+ type, base::TimeTicks::Now(), source, phase, params, false));
+ std::string json;
+ base::JSONWriter::Write(value.get(), &json);
+ VLOG(4) << json;
+ }
+}
+
+uint32 VlogNetLog::NextID() {
+ return id_++;
+}
+
+net::NetLog::LogLevel VlogNetLog::GetLogLevel() const {
+ return LOG_ALL_BUT_BYTES;
+}
+
+void VlogNetLog::AddThreadSafeObserver(ThreadSafeObserver* observer,
+ net::NetLog::LogLevel log_level) {
+ NOTIMPLEMENTED();
+}
+
+void VlogNetLog::SetObserverLogLevel(ThreadSafeObserver* observer,
+ net::NetLog::LogLevel log_level) {
+ NOTIMPLEMENTED();
+}
+
+void VlogNetLog::RemoveThreadSafeObserver(ThreadSafeObserver* observer) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698