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

Unified Diff: chrome/browser/sync/util/time.h

Issue 7981006: [Sync] use base::Time in sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux compile errors Created 9 years, 3 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 | « chrome/browser/sync/util/sqlite_utils.cc ('k') | chrome/browser/sync/util/time.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/util/time.h
diff --git a/chrome/browser/sync/util/time.h b/chrome/browser/sync/util/time.h
new file mode 100644
index 0000000000000000000000000000000000000000..473f7e26c8fa2a018409420fa1510c35209ac35a
--- /dev/null
+++ b/chrome/browser/sync/util/time.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 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.
+//
+// Time-related sync functions.
+
+#ifndef CHROME_BROWSER_SYNC_UTIL_TIME_H_
+#define CHROME_BROWSER_SYNC_UTIL_TIME_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/time.h"
+
+namespace browser_sync {
+
+// Converts a time object to the format used in sync protobufs (ms
+// since the Unix epoch).
+int64 TimeToProtoTime(const base::Time& t);
+
+// Converts a time field from sync protobufs to a time object.
+base::Time ProtoTimeToTime(int64 proto_t);
+
+std::string GetTimeDebugString(const base::Time& t);
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_UTIL_TIME_H_
« no previous file with comments | « chrome/browser/sync/util/sqlite_utils.cc ('k') | chrome/browser/sync/util/time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698