| Index: chrome/browser/extensions/updater/manifest_fetch_data.h
|
| diff --git a/chrome/browser/extensions/updater/manifest_fetch_data.h b/chrome/browser/extensions/updater/manifest_fetch_data.h
|
| index 6468c1e3948dfb140cd2bda563012225cb4638cb..93da067ec0bebdf54443c7f75575d9eaf34f98ca 100644
|
| --- a/chrome/browser/extensions/updater/manifest_fetch_data.h
|
| +++ b/chrome/browser/extensions/updater/manifest_fetch_data.h
|
| @@ -15,12 +15,29 @@
|
|
|
| namespace extensions {
|
|
|
| +struct ManifestFetchExtensionInfo {
|
| + ManifestFetchExtensionInfo(const std::string& id, const std::string& version,
|
| + const std::string& update_url_data,
|
| + const std::string& install_source,
|
| + bool is_sync);
|
| + ManifestFetchExtensionInfo();
|
| + ~ManifestFetchExtensionInfo();
|
| +
|
| + std::string id;
|
| + std::string version;
|
| + std::string update_url_data;
|
| + std::string install_source;
|
| + bool is_sync;
|
| +};
|
| +
|
| // To save on server resources we can request updates for multiple extensions
|
| // in one manifest check. This class helps us keep track of the id's for a
|
| // given fetch, building up the actual URL, and what if anything to include
|
| // in the ping parameter.
|
| class ManifestFetchData {
|
| public:
|
| + typedef std::map<std::string, ManifestFetchExtensionInfo> ExtensionInfoMap;
|
| +
|
| static const int kNeverPinged = -1;
|
|
|
| // Each ping type is sent at most once per day.
|
| @@ -54,12 +71,13 @@ class ManifestFetchData {
|
| bool AddExtension(std::string id, std::string version,
|
| const PingData* ping_data,
|
| const std::string& update_url_data,
|
| - const std::string& install_source);
|
| + const std::string& install_source,
|
| + bool is_sync);
|
|
|
| const GURL& base_url() const { return base_url_; }
|
| const GURL& full_url() const { return full_url_; }
|
| - int extension_count() { return extension_ids_.size(); }
|
| - const std::set<std::string>& extension_ids() const { return extension_ids_; }
|
| + int extension_count() { return extension_infos_.size(); }
|
| + const ExtensionInfoMap& extension_infos() const { return extension_infos_; }
|
|
|
| // Returns true if the given id is included in this manifest fetch.
|
| bool Includes(const std::string& extension_id) const;
|
| @@ -69,8 +87,8 @@ class ManifestFetchData {
|
| bool DidPing(std::string extension_id, PingType type) const;
|
|
|
| private:
|
| - // The set of extension id's for this ManifestFetchData.
|
| - std::set<std::string> extension_ids_;
|
| + // Map of the extension id's to their info.
|
| + ExtensionInfoMap extension_infos_;
|
|
|
| // The set of ping data we actually sent.
|
| std::map<std::string, PingData> pings_;
|
|
|