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

Unified Diff: chrome/browser/sync/internal_api/base_node.cc

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/internal_api/base_node.h ('k') | chrome/browser/sync/internal_api/syncapi_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/internal_api/base_node.cc
diff --git a/chrome/browser/sync/internal_api/base_node.cc b/chrome/browser/sync/internal_api/base_node.cc
index 849fc9b9fa9fbea59e21bd7c8ead86a8dc231965..c409b8a0d9bfc2054e26bc24d2e45ee6ea9c0b5b 100644
--- a/chrome/browser/sync/internal_api/base_node.cc
+++ b/chrome/browser/sync/internal_api/base_node.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "chrome/browser/sync/util/time.h"
using syncable::SPECIFICS;
using sync_pb::AutofillProfileSpecifics;
@@ -174,7 +175,7 @@ int64 BaseNode::GetId() const {
return GetEntry()->Get(syncable::META_HANDLE);
}
-int64 BaseNode::GetModificationTime() const {
+const base::Time& BaseNode::GetModificationTime() const {
return GetEntry()->Get(syncable::MTIME);
}
@@ -235,9 +236,9 @@ DictionaryValue* BaseNode::GetSummaryAsValue() const {
DictionaryValue* BaseNode::GetDetailsAsValue() const {
DictionaryValue* node_info = GetSummaryAsValue();
- // TODO(akalin): Return time in a better format.
- node_info->SetString("modificationTime",
- base::Int64ToString(GetModificationTime()));
+ node_info->SetString(
+ "modificationTime",
+ browser_sync::GetTimeDebugString(GetModificationTime()));
node_info->SetString("parentId", base::Int64ToString(GetParentId()));
// Specifics are already in the Entry value, so no need to duplicate
// it here.
« no previous file with comments | « chrome/browser/sync/internal_api/base_node.h ('k') | chrome/browser/sync/internal_api/syncapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698