Index: extensions/browser/updater/extension_downloader.cc |
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc |
index 91c08c29e28972c55f7d8d82d540d3869fa3682f..7bc7f6752a6c14ca4ec8383a42964adfee75b6e2 100644 |
--- a/extensions/browser/updater/extension_downloader.cc |
+++ b/extensions/browser/updater/extension_downloader.cc |
@@ -252,10 +252,9 @@ void ExtensionDownloader::DoStartAllPending() { |
for (FetchMap::iterator it = fetches_preparing_.begin(); |
it != fetches_preparing_.end(); |
++it) { |
- std::vector<linked_ptr<ManifestFetchData>>& list = it->second; |
- for (size_t i = 0; i < list.size(); ++i) { |
- StartUpdateCheck(std::unique_ptr<ManifestFetchData>(list[i].release())); |
- } |
+ std::vector<std::unique_ptr<ManifestFetchData>>& list = it->second; |
+ for (size_t i = 0; i < list.size(); ++i) |
+ StartUpdateCheck(std::move(list[i])); |
} |
fetches_preparing_.clear(); |
} |
@@ -371,11 +370,13 @@ bool ExtensionDownloader::AddExtensionData(const std::string& id, |
if (!added) { |
// Otherwise add a new element to the list, if the list doesn't exist or |
// if its last element is already full. |
- linked_ptr<ManifestFetchData> fetch( |
+ std::unique_ptr<ManifestFetchData> fetch( |
CreateManifestFetchData(update_url, request_id)); |
- fetches_preparing_[std::make_pair(request_id, update_url)].push_back(fetch); |
- added = fetch->AddExtension(id, version.GetString(), optional_ping_data, |
- update_url_data, install_source); |
+ ManifestFetchData* fetch_ptr = fetch.get(); |
+ fetches_preparing_[std::make_pair(request_id, update_url)].push_back( |
+ std::move(fetch)); |
+ added = fetch_ptr->AddExtension(id, version.GetString(), optional_ping_data, |
+ update_url_data, install_source); |
DCHECK(added); |
} |