| Index: chrome/browser/extensions/updater/extension_updater.cc
|
| diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
|
| index 07503e567b6aefa7e2dc361e9f633fc2a0138982..720a7f18aa9df616c689b333cc89bb05899ffe13 100644
|
| --- a/chrome/browser/extensions/updater/extension_updater.cc
|
| +++ b/chrome/browser/extensions/updater/extension_updater.cc
|
| @@ -97,7 +97,8 @@ int CalculateActivePingDays(const Time& last_active_ping_day,
|
| namespace extensions {
|
|
|
| ExtensionUpdater::CheckParams::CheckParams()
|
| - : install_immediately(false) {}
|
| + : install_immediately(false),
|
| + fetch_priority(ManifestFetchData::FetchPriority::BACKGROUND) {}
|
|
|
| ExtensionUpdater::CheckParams::~CheckParams() {}
|
|
|
| @@ -306,7 +307,8 @@ void ExtensionUpdater::DoCheckSoon() {
|
| void ExtensionUpdater::AddToDownloader(
|
| const ExtensionSet* extensions,
|
| const std::list<std::string>& pending_ids,
|
| - int request_id) {
|
| + int request_id,
|
| + ManifestFetchData::FetchPriority fetch_priority) {
|
| InProgressCheck& request = requests_in_progress_[request_id];
|
| for (ExtensionSet::const_iterator extension_iter = extensions->begin();
|
| extension_iter != extensions->end(); ++extension_iter) {
|
| @@ -321,7 +323,7 @@ void ExtensionUpdater::AddToDownloader(
|
| std::list<std::string>::const_iterator pending_id_iter = std::find(
|
| pending_ids.begin(), pending_ids.end(), extension.id());
|
| if (pending_id_iter == pending_ids.end()) {
|
| - if (downloader_->AddExtension(extension, request_id))
|
| + if (downloader_->AddExtension(extension, request_id, fetch_priority))
|
| request.in_progress_ids_.push_back(extension.id());
|
| }
|
| }
|
| @@ -366,18 +368,21 @@ void ExtensionUpdater::CheckNow(const CheckParams& params) {
|
| *iter, info->update_url(),
|
| pending_extension_manager->IsPolicyReinstallForCorruptionExpected(
|
| *iter),
|
| - request_id))
|
| + request_id, params.fetch_priority))
|
| request.in_progress_ids_.push_back(*iter);
|
| }
|
|
|
| ExtensionRegistry* registry = ExtensionRegistry::Get(profile_);
|
| - AddToDownloader(®istry->enabled_extensions(), pending_ids, request_id);
|
| - AddToDownloader(®istry->disabled_extensions(), pending_ids, request_id);
|
| + AddToDownloader(®istry->enabled_extensions(), pending_ids, request_id,
|
| + params.fetch_priority);
|
| + AddToDownloader(®istry->disabled_extensions(), pending_ids, request_id,
|
| + params.fetch_priority);
|
| } else {
|
| for (std::list<std::string>::const_iterator it = params.ids.begin();
|
| it != params.ids.end(); ++it) {
|
| const Extension* extension = service_->GetExtensionById(*it, true);
|
| - if (extension && downloader_->AddExtension(*extension, request_id))
|
| + if (extension && downloader_->AddExtension(*extension, request_id,
|
| + params.fetch_priority))
|
| request.in_progress_ids_.push_back(extension->id());
|
| }
|
| }
|
|
|