Chromium Code Reviews| 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 0a373a964284bd2a8b869dbecee017d491c3382b..ac044ce0bd5f2d6389aea03757165ad77fac5cbe 100644 |
| --- a/chrome/browser/extensions/updater/extension_updater.cc |
| +++ b/chrome/browser/extensions/updater/extension_updater.cc |
| @@ -189,17 +189,17 @@ ExtensionUpdater::CheckParams::CheckParams() |
| ExtensionUpdater::CheckParams::~CheckParams() {} |
| ExtensionUpdater::FetchedCRXFile::FetchedCRXFile( |
| - const std::string& i, |
| - const base::FilePath& p, |
| + const CRXFileInfo& file, |
| bool file_ownership_passed, |
| const std::set<int>& request_ids) |
| - : extension_id(i), |
| - path(p), |
| + : info(file), |
| file_ownership_passed(file_ownership_passed), |
| - request_ids(request_ids) {} |
| + request_ids(request_ids) { |
| +} |
| ExtensionUpdater::FetchedCRXFile::FetchedCRXFile() |
| - : path(), file_ownership_passed(true) {} |
| + : info(), file_ownership_passed(true) { |
|
asargent_no_longer_on_chrome
2015/02/03 19:26:33
do you need to explicitly call the default constru
|
| +} |
| ExtensionUpdater::FetchedCRXFile::~FetchedCRXFile() {} |
| @@ -591,19 +591,18 @@ void ExtensionUpdater::OnExtensionDownloadFailed( |
| } |
| void ExtensionUpdater::OnExtensionDownloadFinished( |
| - const std::string& id, |
| - const base::FilePath& path, |
| + const CRXFileInfo& file, |
| bool file_ownership_passed, |
| const GURL& download_url, |
| const std::string& version, |
| const PingResult& ping, |
| const std::set<int>& request_ids) { |
| DCHECK(alive_); |
| - UpdatePingData(id, ping); |
| + UpdatePingData(file.extension_id, ping); |
| - VLOG(2) << download_url << " written to " << path.value(); |
| + VLOG(2) << download_url << " written to " << file.path.value(); |
| - FetchedCRXFile fetched(id, path, file_ownership_passed, request_ids); |
| + FetchedCRXFile fetched(file, file_ownership_passed, request_ids); |
| fetched_crx_files_.push(fetched); |
| // MaybeInstallCRXFile() removes extensions from |in_progress_ids_| after |
| @@ -682,14 +681,13 @@ void ExtensionUpdater::MaybeInstallCRXFile() { |
| while (!fetched_crx_files_.empty() && !crx_install_is_running_) { |
| const FetchedCRXFile& crx_file = fetched_crx_files_.top(); |
| - VLOG(2) << "updating " << crx_file.extension_id |
| - << " with " << crx_file.path.value(); |
| + VLOG(2) << "updating " << crx_file.info.extension_id |
| + << " with " << crx_file.info.path.value(); |
| // The ExtensionService is now responsible for cleaning up the temp file |
| - // at |crx_file.path|. |
| + // at |crx_file.info.path|. |
| CrxInstaller* installer = NULL; |
| - if (service_->UpdateExtension(crx_file.extension_id, |
| - crx_file.path, |
| + if (service_->UpdateExtension(crx_file.info, |
| crx_file.file_ownership_passed, |
| &installer)) { |
| crx_install_is_running_ = true; |
| @@ -713,7 +711,7 @@ void ExtensionUpdater::MaybeInstallCRXFile() { |
| for (std::set<int>::const_iterator it = crx_file.request_ids.begin(); |
| it != crx_file.request_ids.end(); ++it) { |
| InProgressCheck& request = requests_in_progress_[*it]; |
| - request.in_progress_ids_.remove(crx_file.extension_id); |
| + request.in_progress_ids_.remove(crx_file.info.extension_id); |
| } |
| request_ids.insert(crx_file.request_ids.begin(), |
| crx_file.request_ids.end()); |
| @@ -739,7 +737,7 @@ void ExtensionUpdater::Observe(int type, |
| for (std::set<int>::const_iterator it = crx_file.request_ids.begin(); |
| it != crx_file.request_ids.end(); ++it) { |
| InProgressCheck& request = requests_in_progress_[*it]; |
| - request.in_progress_ids_.remove(crx_file.extension_id); |
| + request.in_progress_ids_.remove(crx_file.info.extension_id); |
| NotifyIfFinished(*it); |
| } |