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 #include "components/ntp_snippets/reading_list/reading_list_distillation_state_u til.h" | |
6 | |
7 namespace ntp_snippets { | |
8 | |
9 ReadingListEntry::DistillationState ReadingListStateFromSuggestionState( | |
10 ReadingListSuggestionExtra::ReadingListSuggestionDistilledState | |
11 distilled_state) { | |
12 switch (distilled_state) { | |
13 case ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
14 PROCESSING: | |
15 return ReadingListEntry::PROCESSING; | |
16 break; | |
Marc Treib
2017/03/29 08:24:58
No "break" required after "return"
gambard
2017/03/29 09:54:07
Done.
| |
17 case ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
18 SUCCESS: | |
19 return ReadingListEntry::PROCESSED; | |
20 break; | |
21 case ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
22 FAILURE: | |
23 return ReadingListEntry::DISTILLATION_ERROR; | |
24 break; | |
25 } | |
26 } | |
Marc Treib
2017/03/29 08:24:58
I think some compilers (Windows?) will force you t
gambard
2017/03/29 09:54:07
Done.
| |
27 | |
28 ReadingListSuggestionExtra::ReadingListSuggestionDistilledState | |
29 SuggestionStateFromReadingListState( | |
30 ReadingListEntry::DistillationState distilled_state) { | |
31 switch (distilled_state) { | |
32 case ReadingListEntry::WILL_RETRY: | |
33 case ReadingListEntry::PROCESSING: | |
34 case ReadingListEntry::WAITING: | |
35 return ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
36 PROCESSING; | |
37 break; | |
38 case ReadingListEntry::PROCESSED: | |
39 return ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
40 SUCCESS; | |
41 break; | |
42 case ReadingListEntry::DISTILLATION_ERROR: | |
43 return ReadingListSuggestionExtra::ReadingListSuggestionDistilledState:: | |
44 FAILURE; | |
45 break; | |
46 } | |
Marc Treib
2017/03/29 08:24:58
Same here: No "break" after "return", and NOTREACH
gambard
2017/03/29 09:54:07
Done.
| |
47 } | |
48 | |
49 } // namespace ntp_snippets | |
OLD | NEW |