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

Side by Side Diff: ios/chrome/browser/reading_list/reading_list_download_service.cc

Issue 2763233003: Move ReadingList model to components/reading_list/core (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/reading_list/reading_list_download_service.h" 5 #include "ios/chrome/browser/reading_list/reading_list_download_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "components/reading_list/ios/offline_url_utils.h" 16 #include "components/reading_list/core/offline_url_utils.h"
17 #include "components/reading_list/ios/reading_list_entry.h" 17 #include "components/reading_list/core/reading_list_entry.h"
18 #include "components/reading_list/ios/reading_list_model.h" 18 #include "components/reading_list/core/reading_list_model.h"
19 #include "ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h" 19 #include "ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h"
20 #include "ios/web/public/web_thread.h" 20 #include "ios/web/public/web_thread.h"
21 21
22 namespace { 22 namespace {
23 // Status of the download when it ends, for UMA report. 23 // Status of the download when it ends, for UMA report.
24 // These match tools/metrics/histograms/histograms.xml. 24 // These match tools/metrics/histograms/histograms.xml.
25 enum UMADownloadStatus { 25 enum UMADownloadStatus {
26 // The download was successful. 26 // The download was successful.
27 SUCCESS = 0, 27 SUCCESS = 0,
28 // The download failed and it won't be retried. 28 // The download failed and it won't be retried.
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 for (auto& url : url_to_download_cellular_) { 299 for (auto& url : url_to_download_cellular_) {
300 ScheduleDownloadEntry(url); 300 ScheduleDownloadEntry(url);
301 } 301 }
302 } 302 }
303 if (type == net::NetworkChangeNotifier::CONNECTION_WIFI) { 303 if (type == net::NetworkChangeNotifier::CONNECTION_WIFI) {
304 for (auto& url : url_to_download_wifi_) { 304 for (auto& url : url_to_download_wifi_) {
305 ScheduleDownloadEntry(url); 305 ScheduleDownloadEntry(url);
306 } 306 }
307 } 307 }
308 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698