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

Unified Diff: content/renderer/screen_orientation/screen_orientation_dispatcher.cc

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (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: content/renderer/screen_orientation/screen_orientation_dispatcher.cc
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher.cc b/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
index 5f2071d377945cab190ed1bfd71ddf2da976e616..a5ba0536728632444290c8faa392386234825f12 100644
--- a/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
+++ b/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
@@ -4,6 +4,8 @@
#include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
+#include <memory>
+
#include "content/common/screen_orientation_messages.h"
namespace content {
@@ -67,7 +69,8 @@ void ScreenOrientationDispatcher::lockOrientation(
blink::WebLockOrientationCallback* callback) {
CancelPendingLocks();
- int request_id = pending_callbacks_.Add(callback);
+ int request_id = pending_callbacks_.Add(
+ std::unique_ptr<blink::WebLockOrientationCallback>(callback));
Send(new ScreenOrientationHostMsg_LockRequest(
routing_id(), orientation, request_id));
}

Powered by Google App Engine
This is Rietveld 408576698