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

Unified Diff: net/tools/gdig/file_net_log.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/tools/gdig/file_net_log.h ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/gdig/file_net_log.cc
diff --git a/net/tools/gdig/file_net_log.cc b/net/tools/gdig/file_net_log.cc
deleted file mode 100644
index 5020f6de647026312322e420ea096095bb6c1c2b..0000000000000000000000000000000000000000
--- a/net/tools/gdig/file_net_log.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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 <stdio.h>
-
-#include "base/json/json_string_value_serializer.h"
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-#include "net/tools/gdig/file_net_log.h"
-
-namespace net {
-
-FileNetLogObserver::FileNetLogObserver(FILE* destination)
- : destination_(destination) {
- DCHECK(destination != NULL);
-}
-
-FileNetLogObserver::~FileNetLogObserver() {
-}
-
-void FileNetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
- // Only BoundNetLogs without a NetLog should have an invalid source.
- DCHECK(entry.source().IsValid());
-
- const char* source = NetLog::SourceTypeToString(entry.source().type);
- const char* type = NetLog::EventTypeToString(entry.type());
-
- scoped_ptr<base::Value> param_value(entry.ParametersToValue());
- std::string params;
- if (param_value.get() != NULL) {
- JSONStringValueSerializer serializer(&params);
- bool ret = serializer.Serialize(*param_value);
- DCHECK(ret);
- }
- base::Time now = base::Time::NowFromSystemTime();
- base::AutoLock lock(lock_);
- if (first_event_time_.is_null()) {
- first_event_time_ = now;
- }
- base::TimeDelta elapsed_time = now - first_event_time_;
- fprintf(destination_ , "%u\t%u\t%s\t%s\t%s\n",
- static_cast<unsigned>(elapsed_time.InMilliseconds()),
- entry.source().id, source, type, params.c_str());
-}
-
-} // namespace net
« no previous file with comments | « net/tools/gdig/file_net_log.h ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698