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

Unified Diff: chrome/browser/extensions/api/image_writer_private/operation_manager.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 months 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/api/image_writer_private/operation_manager.cc
diff --git a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
index 30a31a811354d56733737cb45d95cd53a20cdcb8..a62d5004e7c59527fef580793a3625b3dd16d50e 100644
--- a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
+++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
@@ -162,9 +162,9 @@ void OperationManager::OnProgress(const ExtensionId& extension_id,
info.stage = stage;
info.percent_complete = progress;
- scoped_ptr<base::ListValue> args(
+ std::unique_ptr<base::ListValue> args(
image_writer_api::OnWriteProgress::Create(info));
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<Event> event(new Event(
events::IMAGE_WRITER_PRIVATE_ON_WRITE_PROGRESS,
image_writer_api::OnWriteProgress::kEventName, std::move(args)));
@@ -175,8 +175,9 @@ void OperationManager::OnProgress(const ExtensionId& extension_id,
void OperationManager::OnComplete(const ExtensionId& extension_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- scoped_ptr<base::ListValue> args(image_writer_api::OnWriteComplete::Create());
- scoped_ptr<Event> event(new Event(
+ std::unique_ptr<base::ListValue> args(
+ image_writer_api::OnWriteComplete::Create());
+ std::unique_ptr<Event> event(new Event(
events::IMAGE_WRITER_PRIVATE_ON_WRITE_COMPLETE,
image_writer_api::OnWriteComplete::kEventName, std::move(args)));
@@ -198,11 +199,11 @@ void OperationManager::OnError(const ExtensionId& extension_id,
info.stage = stage;
info.percent_complete = progress;
- scoped_ptr<base::ListValue> args(
+ std::unique_ptr<base::ListValue> args(
image_writer_api::OnWriteError::Create(info, error_message));
- scoped_ptr<Event> event(new Event(events::IMAGE_WRITER_PRIVATE_ON_WRITE_ERROR,
- image_writer_api::OnWriteError::kEventName,
- std::move(args)));
+ std::unique_ptr<Event> event(
+ new Event(events::IMAGE_WRITER_PRIVATE_ON_WRITE_ERROR,
+ image_writer_api::OnWriteError::kEventName, std::move(args)));
EventRouter::Get(browser_context_)
->DispatchEventToExtension(extension_id, std::move(event));

Powered by Google App Engine
This is Rietveld 408576698