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

Side by Side Diff: chrome/browser/sync/notifier/base/time.cc

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 2009 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 "chrome/browser/sync/notifier/base/time.h"
6
7 #include <string>
8 #include <time.h>
9
10 #include "chrome/browser/sync/notifier/base/utils.h"
11 #include "talk/base/common.h"
12 #include "talk/base/logging.h"
13
14 namespace notifier {
15
16 char* GetLocalTimeAsString() {
17 time64 long_time = GetCurrent100NSTime();
18 struct tm now;
19 Time64ToTm(long_time, &now);
20 char* time_string = asctime(&now);
21 if (time_string) {
22 int time_len = strlen(time_string);
23 if (time_len > 0) {
24 time_string[time_len - 1] = 0; // trim off terminating \n.
25 }
26 }
27 return time_string;
28 }
29
30 } // namespace notifier
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/base/time.h ('k') | chrome/browser/sync/notifier/base/time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698