| OLD | NEW |
| 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 |
| OLD | NEW |