Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/chrome/browser/ui/reading_list/reading_list_utils.h" | |
| 6 | |
| 7 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 8 #error "This file requires ARC support." | |
| 9 #endif | |
| 10 | |
| 11 ReadingListUIDistillationStatus UIStatusFromModelStatus( | |
| 12 ReadingListEntry::DistillationState distillation_state) { | |
| 13 switch (distillation_state) { | |
|
lpromero
2017/03/30 12:58:27
Nice. So it was not even 1:1 in our use case.
| |
| 14 case ReadingListEntry::WILL_RETRY: | |
| 15 case ReadingListEntry::PROCESSING: | |
| 16 case ReadingListEntry::WAITING: | |
| 17 return ReadingListUIDistillationStatusPending; | |
| 18 case ReadingListEntry::PROCESSED: | |
| 19 return ReadingListUIDistillationStatusSuccess; | |
| 20 case ReadingListEntry::DISTILLATION_ERROR: | |
| 21 return ReadingListUIDistillationStatusFailure; | |
| 22 } | |
| 23 } | |
| OLD | NEW |