summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 16:19:04 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 16:19:04 +0000
commitcd2434bc3b2f3fb3ad29afb2c13e22fd1ac6c988 (patch)
tree328a8057ffc7a1c81efccde49c3ae750b6fd8956
parent7924c1854df84611ce14ddb697dfb3f5a38c9067 (diff)
downloadchromium_src-cd2434bc3b2f3fb3ad29afb2c13e22fd1ac6c988.zip
chromium_src-cd2434bc3b2f3fb3ad29afb2c13e22fd1ac6c988.tar.gz
chromium_src-cd2434bc3b2f3fb3ad29afb2c13e22fd1ac6c988.tar.bz2
bookmarks: Remove bookmark time migration code.
Revision r24417 resulted in some time 'fixing' code in the bookmark manager. The code in question was added to BookmarkCodec::DecodeNode() where it checks whether the date is before 1970 or not. The times on disk will get updated the next time the user adds or modifies a bookmark. This will only be incorrect for Linux and Mac users we had before this change went in. After a "while" all these users should get updated times and we can remove this code. And that "while" after 3 years and 8 months arrived, it's time to get rid of this migration code. BUG=20264 R=brettw@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/15090002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202105 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/bookmarks/bookmark_codec.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc
index 4455744..8fde555 100644
--- a/chrome/browser/bookmarks/bookmark_codec.cc
+++ b/chrome/browser/bookmarks/bookmark_codec.cc
@@ -253,20 +253,6 @@ bool BookmarkCodec::DecodeNode(const DictionaryValue& value,
date_added_string = base::Int64ToString(Time::Now().ToInternalValue());
int64 internal_time;
base::StringToInt64(date_added_string, &internal_time);
- base::Time date_added = base::Time::FromInternalValue(internal_time);
-#if !defined(OS_WIN)
- // We changed the epoch for dates on Mac & Linux from 1970 to the Windows
- // one of 1601. We assume any number we encounter from before 1970 is using
- // the old format, so we need to add the delta to it.
- //
- // This code should be removed at some point:
- // http://code.google.com/p/chromium/issues/detail?id=20264
- if (date_added.ToInternalValue() <
- base::Time::kWindowsEpochDeltaMicroseconds) {
- date_added = base::Time::FromInternalValue(date_added.ToInternalValue() +
- base::Time::kWindowsEpochDeltaMicroseconds);
- }
-#endif
std::string type_string;
if (!value.GetString(kTypeKey, &type_string))
@@ -324,7 +310,7 @@ bool BookmarkCodec::DecodeNode(const DictionaryValue& value,
}
node->SetTitle(title);
- node->set_date_added(date_added);
+ node->set_date_added(base::Time::FromInternalValue(internal_time));
std::string meta_info;
if (value.GetString(kMetaInfo, &meta_info))