| Index: extensions/browser/updater/manifest_fetch_data.cc
|
| diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/browser/updater/manifest_fetch_data.cc
|
| index ed7626eaf694527af59b338a03ff49689b43f6d1..7ca8f72caaaefa2c822537bfa21609530a2a2c91 100644
|
| --- a/extensions/browser/updater/manifest_fetch_data.cc
|
| +++ b/extensions/browser/updater/manifest_fetch_data.cc
|
| @@ -41,11 +41,13 @@ ManifestFetchData::ManifestFetchData(const GURL& update_url,
|
| int request_id,
|
| const std::string& brand_code,
|
| const std::string& base_query_params,
|
| - PingMode ping_mode)
|
| + PingMode ping_mode,
|
| + bool on_demand_update)
|
| : base_url_(update_url),
|
| full_url_(update_url),
|
| brand_code_(brand_code),
|
| - ping_mode_(ping_mode) {
|
| + ping_mode_(ping_mode),
|
| + on_demand_update_(on_demand_update) {
|
| std::string query =
|
| full_url_.has_query() ? full_url_.query() + "&" : std::string();
|
| query += base_query_params;
|
| @@ -85,12 +87,17 @@ bool ManifestFetchData::AddExtension(const std::string& id,
|
| const std::string& version,
|
| const PingData* ping_data,
|
| const std::string& update_url_data,
|
| - const std::string& install_source) {
|
| + const std::string& install_source,
|
| + bool on_demand_update) {
|
| if (extension_ids_.find(id) != extension_ids_.end()) {
|
| NOTREACHED() << "Duplicate extension id " << id;
|
| return false;
|
| }
|
|
|
| + if (on_demand_update != on_demand_update_) {
|
| + return false;
|
| + }
|
| +
|
| // Compute the string we'd append onto the full_url_, and see if it fits.
|
| std::vector<std::string> parts;
|
| parts.push_back("id=" + id);
|
| @@ -173,6 +180,7 @@ bool ManifestFetchData::DidPing(const std::string& extension_id,
|
|
|
| void ManifestFetchData::Merge(const ManifestFetchData& other) {
|
| DCHECK(full_url() == other.full_url());
|
| + on_demand_update_ |= other.on_demand_update_;
|
| request_ids_.insert(other.request_ids_.begin(), other.request_ids_.end());
|
| }
|
|
|
|
|