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

Unified Diff: media/base/cdm_promise_adapter.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: . 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: media/base/cdm_promise_adapter.h
diff --git a/media/base/cdm_promise_adapter.h b/media/base/cdm_promise_adapter.h
index f514439e57f25a06a2d565145c5aea6052833f24..26c70642af93f416d7ce0d21579553af8c4405c2 100644
--- a/media/base/cdm_promise_adapter.h
+++ b/media/base/cdm_promise_adapter.h
@@ -7,9 +7,10 @@
#include <stdint.h>
+#include <memory>
+
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_export.h"
@@ -25,7 +26,7 @@ class MEDIA_EXPORT CdmPromiseAdapter {
~CdmPromiseAdapter();
// Takes ownership of |promise| and returns an integer promise ID.
- uint32_t SavePromise(scoped_ptr<media::CdmPromise> promise);
+ uint32_t SavePromise(std::unique_ptr<media::CdmPromise> promise);
// Takes the promise for |promise_id|, sanity checks its |type|, and resolves
// it with |result|.
@@ -44,11 +45,12 @@ class MEDIA_EXPORT CdmPromiseAdapter {
private:
// A map between promise IDs and CdmPromises. It owns the CdmPromises.
- typedef base::ScopedPtrHashMap<uint32_t, scoped_ptr<CdmPromise>> PromiseMap;
+ typedef base::ScopedPtrHashMap<uint32_t, std::unique_ptr<CdmPromise>>
+ PromiseMap;
// Finds, takes the ownership of and returns the promise for |promise_id|.
// Returns null if no promise can be found.
- scoped_ptr<CdmPromise> TakePromise(uint32_t promise_id);
+ std::unique_ptr<CdmPromise> TakePromise(uint32_t promise_id);
uint32_t next_promise_id_;
PromiseMap promises_;

Powered by Google App Engine
This is Rietveld 408576698