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 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_REMOVER_HELPER_H_ | |
| 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_REMOVER_HELPER_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "components/reading_list/ios/reading_list_model_observer.h" | |
| 10 | |
| 11 namespace ios { | |
| 12 class ChromeBrowserState; | |
| 13 } | |
| 14 | |
| 15 class ReadingListModel; | |
| 16 class ReadingListDownloadService; | |
| 17 | |
| 18 namespace reading_list { | |
| 19 class ReadingListRemoverHelper : public ReadingListModelObserver { | |
| 20 public: | |
| 21 using Callback = base::Callback<void(bool)>; | |
| 22 ReadingListRemoverHelper(ios::ChromeBrowserState* browser_state); | |
| 23 ~ReadingListRemoverHelper() override; | |
| 24 | |
| 25 // Removes all Reading list items and call completion with |true| if the | |
| 26 // cleaning was successful. | |
| 27 void RemoveAllUserReadingListItemsIOS(Callback completion); | |
| 28 | |
| 29 // ReadingListModelObserver implementation. | |
| 30 void ReadingListModelLoaded(const ReadingListModel* model) override; | |
| 31 void ReadingListModelBeingDeleted(const ReadingListModel* model) override; | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_COPY_AND_ASSIGN(ReadingListRemoverHelper); | |
|
jif
2017/03/14 15:38:43
DISALLOW_COPY_AND_ASSIGN( goes at the end of the p
Olivier
2017/03/14 17:56:20
Oups, thanks.
| |
| 35 Callback completion_; | |
| 36 ReadingListModel* reading_list_model_; | |
| 37 ReadingListDownloadService* reading_list_download_service_; | |
| 38 }; | |
| 39 } // namespace reading_list | |
| 40 | |
| 41 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_REMOVER_HELPER_H_ | |
| OLD | NEW |