diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 03:19:35 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 03:19:35 +0000 |
commit | 82d105ecf3aadbb90e0adf80f857533967e8f383 (patch) | |
tree | 4dde11c5e525a813ec2dc847e10c1478c7291453 /remoting/base/util.cc | |
parent | 05130153c2e1f772955484f89169e505f809ba43 (diff) | |
download | chromium_src-82d105ecf3aadbb90e0adf80f857533967e8f383.zip chromium_src-82d105ecf3aadbb90e0adf80f857533967e8f383.tar.gz chromium_src-82d105ecf3aadbb90e0adf80f857533967e8f383.tar.bz2 |
Modify Chromoting logging to hook into base logging.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7355011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base/util.cc')
-rw-r--r-- | remoting/base/util.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/remoting/base/util.cc b/remoting/base/util.cc index 2e7d7df..8671eeb 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 |