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

Side by Side Diff: ios/chrome/browser/ui/reading_list/reading_list_utils.mm

Issue 2796273002: Display offline availability on ContentSuggestions (Closed)
Patch Set: Adress comments Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/ui/reading_list/reading_list_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/chrome/browser/ui/reading_list/reading_list_utils.h" 5 #import "ios/chrome/browser/ui/reading_list/reading_list_utils.h"
6 6
7 #if !defined(__has_feature) || !__has_feature(objc_arc) 7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support." 8 #error "This file requires ARC support."
9 #endif 9 #endif
10 10
11 namespace reading_list {
12
11 ReadingListUIDistillationStatus UIStatusFromModelStatus( 13 ReadingListUIDistillationStatus UIStatusFromModelStatus(
12 ReadingListEntry::DistillationState distillation_state) { 14 ReadingListEntry::DistillationState distillation_state) {
13 switch (distillation_state) { 15 switch (distillation_state) {
14 case ReadingListEntry::WILL_RETRY: 16 case ReadingListEntry::WILL_RETRY:
15 case ReadingListEntry::PROCESSING: 17 case ReadingListEntry::PROCESSING:
16 case ReadingListEntry::WAITING: 18 case ReadingListEntry::WAITING:
17 return ReadingListUIDistillationStatusPending; 19 return ReadingListUIDistillationStatusPending;
18 case ReadingListEntry::PROCESSED: 20 case ReadingListEntry::PROCESSED:
19 return ReadingListUIDistillationStatusSuccess; 21 return ReadingListUIDistillationStatusSuccess;
20 case ReadingListEntry::DISTILLATION_ERROR: 22 case ReadingListEntry::DISTILLATION_ERROR:
21 return ReadingListUIDistillationStatusFailure; 23 return ReadingListUIDistillationStatusFailure;
22 } 24 }
23 } 25 }
26
27 } // namespace reading_list
OLDNEW
« 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