| 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 #ifndef COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ | 5 #ifndef COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ |
| 6 #define COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ | 6 #define COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void Update(const Entry& entry) override; | 33 void Update(const Entry& entry) override; |
| 34 void Remove(const std::string& guid) override; | 34 void Remove(const std::string& guid) override; |
| 35 Entry* Get(const std::string& guid) override; | 35 Entry* Get(const std::string& guid) override; |
| 36 EntryList PeekEntries() override; | 36 EntryList PeekEntries() override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 using OwnedEntryMap = std::map<std::string, std::unique_ptr<Entry>>; | 39 using OwnedEntryMap = std::map<std::string, std::unique_ptr<Entry>>; |
| 40 | 40 |
| 41 void OnInitializedFinished(bool success, | 41 void OnInitializedFinished(bool success, |
| 42 std::unique_ptr<std::vector<Entry>> entries); | 42 std::unique_ptr<std::vector<Entry>> entries); |
| 43 void OnDestroyFinished(bool success); | |
| 44 void OnAddFinished(DownloadClient client, | 43 void OnAddFinished(DownloadClient client, |
| 45 const std::string& guid, | 44 const std::string& guid, |
| 46 bool success); | 45 bool success); |
| 47 void OnUpdateFinished(DownloadClient client, | 46 void OnUpdateFinished(DownloadClient client, |
| 48 const std::string& guid, | 47 const std::string& guid, |
| 49 bool success); | 48 bool success); |
| 50 void OnRemoveFinished(DownloadClient client, | 49 void OnRemoveFinished(DownloadClient client, |
| 51 const std::string& guid, | 50 const std::string& guid, |
| 52 bool success); | 51 bool success); |
| 53 | 52 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 64 OwnedEntryMap entries_; | 63 OwnedEntryMap entries_; |
| 65 | 64 |
| 66 base::WeakPtrFactory<ModelImpl> weak_ptr_factory_; | 65 base::WeakPtrFactory<ModelImpl> weak_ptr_factory_; |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(ModelImpl); | 67 DISALLOW_COPY_AND_ASSIGN(ModelImpl); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } // namespace download | 70 } // namespace download |
| 72 | 71 |
| 73 #endif // COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ | 72 #endif // COMPONENTS_DOWNLOAD_INTERNAL_MODEL_IMPL_H_ |
| OLD | NEW |