| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // | | | | | | 48 // | | | | | |
| 49 // | | error V | | | 49 // | | error V | | |
| 50 // | +---------<- kUpdatingDiff ->--------|-----------+ success | 50 // | +---------<- kUpdatingDiff ->--------|-----------+ success |
| 51 // | | | | 51 // | | | |
| 52 // | error V | | 52 // | error V | |
| 53 // +----------------------------------------- kDownloading | | 53 // +----------------------------------------- kDownloading | |
| 54 // | | | | 54 // | | | |
| 55 // | error V | | 55 // | error V | |
| 56 // +------------------------------------------ kUpdating ->----+ success | 56 // +------------------------------------------ kUpdating ->----+ success |
| 57 // | 57 // |
| 58 struct CrxUpdateItem { | 58 struct CrxUpdateItem : public base::SupportsWeakPtr<CrxUpdateItem> { |
| 59 enum Status { | 59 enum Status { |
| 60 kNew, | 60 kNew, |
| 61 kChecking, | 61 kChecking, |
| 62 kCanUpdate, | 62 kCanUpdate, |
| 63 kDownloadingDiff, | 63 kDownloadingDiff, |
| 64 kDownloading, | 64 kDownloading, |
| 65 kUpdatingDiff, | 65 kUpdatingDiff, |
| 66 kUpdating, | 66 kUpdating, |
| 67 kUpdated, | 67 kUpdated, |
| 68 kUpToDate, | 68 kUpToDate, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Function object used to find a specific component. | 118 // Function object used to find a specific component. |
| 119 class FindById { | 119 class FindById { |
| 120 public: | 120 public: |
| 121 explicit FindById(const std::string& id) : id_(id) {} | 121 explicit FindById(const std::string& id) : id_(id) {} |
| 122 | 122 |
| 123 bool operator()(CrxUpdateItem* item) const { return item->id == id_; } | 123 bool operator()(CrxUpdateItem* item) const { return item->id == id_; } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 const std::string& id_; | 126 const std::string& id_; |
| 127 }; | 127 }; |
| 128 |
| 129 private: |
| 130 DISALLOW_COPY_AND_ASSIGN(CrxUpdateItem); |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 } // namespace component_updater | 133 } // namespace component_updater |
| 131 | 134 |
| 132 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ | 135 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ |
| OLD | NEW |