Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / component_updater / crx_update_item.h
index 87bfafe..5b0756c 100644 (file)
@@ -13,8 +13,9 @@
 #include "base/time/time.h"
 #include "base/version.h"
 #include "chrome/browser/component_updater/component_updater_service.h"
+#include "chrome/browser/component_updater/crx_downloader.h"
 
-class CUResourceThrottle;
+namespace component_updater {
 
 // This is the one and only per-item state structure. Designed to be hosted
 // in a std::vector or a std::list. The two main members are |component|
@@ -76,9 +77,9 @@ struct CrxUpdateItem {
 
   base::Time last_check;
 
-  // The url the full and differential update CRXs are downloaded from.
-  GURL crx_url;
-  GURL diff_crx_url;
+  // A component can be made available for download from several urls.
+  std::vector<GURL> crx_urls;
+  std::vector<GURL> crx_diffurls;
 
   // The from/to version and fingerprint values.
   Version previous_version;
@@ -105,7 +106,9 @@ struct CrxUpdateItem {
   int diff_error_code;
   int diff_extra_code1;
 
-  std::vector<base::WeakPtr<CUResourceThrottle> > throttles;
+  std::vector<CrxDownloader::DownloadMetrics> download_metrics;
+
+  std::vector<base::Closure> ready_callbacks;
 
   CrxUpdateItem();
   ~CrxUpdateItem();
@@ -115,12 +118,13 @@ struct CrxUpdateItem {
    public:
     explicit FindById(const std::string& id) : id_(id) {}
 
-    bool operator() (CrxUpdateItem* item) const {
-      return (item->id == id_);
-    }
+    bool operator()(CrxUpdateItem* item) const { return item->id == id_; }
+
    private:
     const std::string& id_;
   };
 };
 
+}  // namespace component_updater
+
 #endif  // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_