Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: chrome/browser/extensions/install_verifier.cc

Issue 2466523002: Remove some linked_ptr c/b/extension (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/install_verifier.cc
diff --git a/chrome/browser/extensions/install_verifier.cc b/chrome/browser/extensions/install_verifier.cc
index 8a4e6a6e84616b10703add6216abe9ba6af7847d..2161112d91f10b888b710a3c7db45047b2737365 100644
--- a/chrome/browser/extensions/install_verifier.cc
+++ b/chrome/browser/extensions/install_verifier.cc
@@ -300,11 +300,11 @@ void InstallVerifier::AddMany(const ExtensionIdSet& ids, OperationType type) {
}
}
- InstallVerifier::PendingOperation* operation =
- new InstallVerifier::PendingOperation(type);
+ std::unique_ptr<InstallVerifier::PendingOperation> operation(
+ new InstallVerifier::PendingOperation(type));
operation->ids.insert(ids.begin(), ids.end());
- operation_queue_.push(linked_ptr<PendingOperation>(operation));
+ operation_queue_.push(std::move(operation));
// If there are no ongoing pending requests, we need to kick one off.
if (operation_queue_.size() == 1)
@@ -337,11 +337,11 @@ void InstallVerifier::RemoveMany(const ExtensionIdSet& ids) {
if (!found_any)
return;
- InstallVerifier::PendingOperation* operation =
- new InstallVerifier::PendingOperation(InstallVerifier::REMOVE);
+ std::unique_ptr<InstallVerifier::PendingOperation> operation(
+ new InstallVerifier::PendingOperation(InstallVerifier::REMOVE));
operation->ids = ids;
- operation_queue_.push(linked_ptr<PendingOperation>(operation));
+ operation_queue_.push(std::move(operation));
if (operation_queue_.size() == 1)
BeginFetch();
}
@@ -628,7 +628,8 @@ void GetSignatureResultHistogram(CallbackResult result) {
void InstallVerifier::SignatureCallback(
std::unique_ptr<InstallSignature> signature) {
- linked_ptr<PendingOperation> operation = operation_queue_.front();
+ std::unique_ptr<PendingOperation> operation =
+ std::move(operation_queue_.front());
operation_queue_.pop();
bool success = false;

Powered by Google App Engine
This is Rietveld 408576698