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

Unified Diff: chrome/browser/history/thumbnail_database.cc

Issue 10915092: Update thumbnail_database to store times using ToInternalValue() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | chrome/browser/history/thumbnail_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/thumbnail_database.cc
diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc
index 8235089f9829687ca1f2e97d9048e1909ee617e0..d0ef182e61e9b4373857e4297eddbe0bacb25846 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/chrome/browser/history/thumbnail_database.cc
@@ -373,7 +373,7 @@ bool ThumbnailDatabase::SetPageThumbnail(
statement.BindDouble(1, score.boring_score);
statement.BindBool(2, score.good_clipping);
statement.BindBool(3, score.at_top);
- statement.BindInt64(4, score.time_at_snapshot.ToTimeT());
+ statement.BindInt64(4, score.time_at_snapshot.ToInternalValue());
statement.BindBlob(5, &jpeg_data[0],
static_cast<int>(jpeg_data.size()));
@@ -441,7 +441,7 @@ bool ThumbnailDatabase::ThumbnailScoreForId(URLID id,
bool current_clipping = select_statement.ColumnBool(1);
bool current_at_top = select_statement.ColumnBool(2);
base::Time last_updated =
- base::Time::FromTimeT(select_statement.ColumnInt64(3));
+ base::Time::FromInternalValue(select_statement.ColumnInt64(3));
*score = ThumbnailScore(current_boring_score, current_clipping,
current_at_top, last_updated);
return true;
@@ -466,7 +466,7 @@ bool ThumbnailDatabase::GetFaviconBitmaps(
favicon_bitmap.bitmap_id = statement.ColumnInt64(0);
favicon_bitmap.icon_id = icon_id;
favicon_bitmap.last_updated =
- base::Time::FromTimeT(statement.ColumnInt64(1));
+ base::Time::FromInternalValue(statement.ColumnInt64(1));
if (statement.ColumnByteLength(2) > 0) {
scoped_refptr<base::RefCountedBytes> data(new base::RefCountedBytes());
statement.ColumnBlobAsVector(2, &data->data());
@@ -495,7 +495,7 @@ FaviconBitmapID ThumbnailDatabase::AddFaviconBitmap(
} else {
statement.BindNull(1);
}
- statement.BindInt64(2, time.ToTimeT());
+ statement.BindInt64(2, time.ToInternalValue());
statement.BindInt(3, pixel_size.width());
statement.BindInt(4, pixel_size.height());
« no previous file with comments | « no previous file | chrome/browser/history/thumbnail_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698