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

Unified Diff: ios/chrome/browser/ui/reading_list/reading_list_utils.mm

Issue 2784803002: Add mediation for ReadingList distillation state (Closed)
Patch Set: Fix build 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/reading_list/reading_list_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/reading_list/reading_list_utils.mm
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_utils.mm b/ios/chrome/browser/ui/reading_list/reading_list_utils.mm
new file mode 100644
index 0000000000000000000000000000000000000000..6d80d6349eff82756e6da0cc9938549645bc2ec6
--- /dev/null
+++ b/ios/chrome/browser/ui/reading_list/reading_list_utils.mm
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/reading_list/reading_list_utils.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+ReadingListUIDistillationStatus UIStatusFromModelStatus(
+ ReadingListEntry::DistillationState distillation_state) {
+ switch (distillation_state) {
lpromero 2017/03/30 12:58:27 Nice. So it was not even 1:1 in our use case.
+ case ReadingListEntry::WILL_RETRY:
+ case ReadingListEntry::PROCESSING:
+ case ReadingListEntry::WAITING:
+ return ReadingListUIDistillationStatusPending;
+ case ReadingListEntry::PROCESSED:
+ return ReadingListUIDistillationStatusSuccess;
+ case ReadingListEntry::DISTILLATION_ERROR:
+ return ReadingListUIDistillationStatusFailure;
+ }
+}
« no previous file with comments | « ios/chrome/browser/ui/reading_list/reading_list_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698