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

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

Issue 2350663003: Make reading list entry movable only (Closed)
Patch Set: indentation Created 4 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 | ios/chrome/browser/reading_list/reading_list_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61b1d01d93ab416efa3555a6323f1b9990ee0d29..aacdee7fc76be033206e1f5eed0528629004a73a 100644
--- a/ios/chrome/browser/reading_list/reading_list_download_service.cc
+++ b/ios/chrome/browser/reading_list/reading_list_download_service.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "ios/chrome/browser/reading_list/reading_list_entry.h"
#include "ios/chrome/browser/reading_list/reading_list_model.h"
@@ -18,12 +19,12 @@ ReadingListDownloadService::ReadingListDownloadService(
base::FilePath chrome_profile_path)
: reading_list_model_(reading_list_model) {
DCHECK(reading_list_model);
- url_downloader_ = std::unique_ptr<URLDownloader>(
- new URLDownloader(distiller_service, prefs, chrome_profile_path,
- base::Bind(&ReadingListDownloadService::OnDownloadEnd,
- base::Unretained(this)),
- base::Bind(&ReadingListDownloadService::OnDeleteEnd,
- base::Unretained(this))));
+ url_downloader_ = base::MakeUnique<URLDownloader>(
+ distiller_service, prefs, chrome_profile_path,
+ base::Bind(&ReadingListDownloadService::OnDownloadEnd,
+ base::Unretained(this)),
+ base::Bind(&ReadingListDownloadService::OnDeleteEnd,
+ base::Unretained(this)));
}
ReadingListDownloadService::~ReadingListDownloadService() {}
@@ -74,12 +75,13 @@ void ReadingListDownloadService::DownloadAllEntries() {
DCHECK(reading_list_model_->loaded());
size_t size = reading_list_model_->unread_size();
for (size_t i = 0; i < size; i++) {
- ReadingListEntry entry = reading_list_model_->GetUnreadEntryAtIndex(i);
+ const ReadingListEntry& entry =
+ reading_list_model_->GetUnreadEntryAtIndex(i);
this->DownloadEntry(entry);
}
size = reading_list_model_->read_size();
for (size_t i = 0; i < size; i++) {
- ReadingListEntry entry = reading_list_model_->GetReadEntryAtIndex(i);
+ const ReadingListEntry& entry = reading_list_model_->GetReadEntryAtIndex(i);
this->DownloadEntry(entry);
}
}
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698