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

Unified Diff: ios/chrome/browser/reading_list/reading_list_download_service.cc

Issue 2707043002: [Reading List iOS] Store distillation date and size. (Closed)
Patch Set: done Created 3 years, 10 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
Index: ios/chrome/browser/reading_list/reading_list_download_service.cc
diff --git a/ios/chrome/browser/reading_list/reading_list_download_service.cc b/ios/chrome/browser/reading_list/reading_list_download_service.cc
index e44d1a7de458133952ddf49635eb76efa33f8f6c..fba65f1f842c8b8862c08db969be96290b00f251 100644
--- a/ios/chrome/browser/reading_list/reading_list_download_service.cc
+++ b/ios/chrome/browser/reading_list/reading_list_download_service.cc
@@ -233,6 +233,7 @@ void ReadingListDownloadService::OnDownloadEnd(
const GURL& distilled_url,
URLDownloader::SuccessState success,
const base::FilePath& distilled_path,
+ int64_t size,
const std::string& title) {
DCHECK(reading_list_model_->loaded());
URLDownloader::SuccessState real_success_value = success;
@@ -242,8 +243,10 @@ void ReadingListDownloadService::OnDownloadEnd(
switch (real_success_value) {
case URLDownloader::DOWNLOAD_SUCCESS:
case URLDownloader::DOWNLOAD_EXISTS: {
+ int64_t now =
+ (base::Time::Now() - base::Time::UnixEpoch()).InMicroseconds();
reading_list_model_->SetEntryDistilledInfo(url, distilled_path,
- distilled_url);
+ distilled_url, size, now);
std::string trimmed_title = base::CollapseWhitespaceASCII(title, false);
if (!trimmed_title.empty())

Powered by Google App Engine
This is Rietveld 408576698