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

Unified Diff: remoting/base/util.cc

Issue 7355011: Modify Chromoting logging to hook into base logging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 5 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 | « remoting/base/util.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/util.cc
diff --git a/remoting/base/util.cc b/remoting/base/util.cc
index 2e7d7df8d942bf2ac3974176c3e3eb02856b332a..8671eebf0c000d52dcdc7fbc52b353d46fa0b29e 100644
--- a/remoting/base/util.cc
+++ b/remoting/base/util.cc
@@ -2,16 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/logging.h"
+#include "base/stringprintf.h"
+#include "base/time.h"
#include "media/base/video_frame.h"
#include "media/base/yuv_convert.h"
#include "remoting/base/util.h"
-#include "base/logging.h"
-
using media::VideoFrame;
namespace remoting {
+std::string GetTimestampString() {
+ base::Time t = base::Time::NowFromSystemTime();
+ base::Time::Exploded tex;
+ t.LocalExplode(&tex);
+ return StringPrintf("%02d%02d/%02d%02d%02d:",
+ tex.month, tex.day_of_month,
+ tex.hour, tex.minute, tex.second);
+}
+
int GetBytesPerPixel(VideoFrame::Format format) {
// Note: The order is important here for performance. This is sorted from the
// most common to the less common (PIXEL_FORMAT_ASCII is mostly used
« no previous file with comments | « remoting/base/util.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698