| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "base/version.h" | 14 #include "base/version.h" |
| 15 #include "chrome/browser/component_updater/component_updater_service.h" | 15 #include "chrome/browser/component_updater/component_updater_service.h" |
| 16 #include "chrome/browser/component_updater/crx_downloader.h" | 16 #include "chrome/browser/component_updater/crx_downloader.h" |
| 17 | 17 |
| 18 namespace component_updater { |
| 19 |
| 18 class CUResourceThrottle; | 20 class CUResourceThrottle; |
| 19 | 21 |
| 20 namespace component_updater { | |
| 21 | |
| 22 // This is the one and only per-item state structure. Designed to be hosted | 22 // This is the one and only per-item state structure. Designed to be hosted |
| 23 // in a std::vector or a std::list. The two main members are |component| | 23 // in a std::vector or a std::list. The two main members are |component| |
| 24 // which is supplied by the the component updater client and |status| which | 24 // which is supplied by the the component updater client and |status| which |
| 25 // is modified as the item is processed by the update pipeline. The expected | 25 // is modified as the item is processed by the update pipeline. The expected |
| 26 // transition graph is: | 26 // transition graph is: |
| 27 // | 27 // |
| 28 // on-demand on-demand | 28 // on-demand on-demand |
| 29 // +---------------------------> kNew <--------------+-------------+ | 29 // +---------------------------> kNew <--------------+-------------+ |
| 30 // | | | | | 30 // | | | | |
| 31 // | V | | | 31 // | V | | |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 return (item->id == id_); | 124 return (item->id == id_); |
| 125 } | 125 } |
| 126 private: | 126 private: |
| 127 const std::string& id_; | 127 const std::string& id_; |
| 128 }; | 128 }; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace component_updater | 131 } // namespace component_updater |
| 132 | 132 |
| 133 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ | 133 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ |
| OLD | NEW |