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

Unified Diff: media/base/android/media_drm_bridge.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/android/media_drm_bridge.h
diff --git a/media/base/android/media_drm_bridge.h b/media/base/android/media_drm_bridge.h
index 8c31f89694ade4fd88341ae6536c923a02c01436..c2cc2dca272e7ec817a9682036c284c0dff6a922 100644
--- a/media/base/android/media_drm_bridge.h
+++ b/media/base/android/media_drm_bridge.h
@@ -7,13 +7,14 @@
#include <jni.h>
#include <stdint.h>
+
+#include <memory>
#include <string>
#include <vector>
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "media/base/android/media_drm_bridge_cdm_context.h"
#include "media/base/android/provision_fetcher.h"
@@ -45,7 +46,8 @@ class MEDIA_EXPORT MediaDrmBridge : public MediaKeys, public PlayerTracker {
SECURITY_LEVEL_3 = 3,
};
- using JavaObjectPtr = scoped_ptr<base::android::ScopedJavaGlobalRef<jobject>>;
+ using JavaObjectPtr =
+ std::unique_ptr<base::android::ScopedJavaGlobalRef<jobject>>;
using ResetCredentialsCB = base::Callback<void(bool)>;
@@ -99,22 +101,23 @@ class MEDIA_EXPORT MediaDrmBridge : public MediaKeys, public PlayerTracker {
// MediaKeys implementation.
void SetServerCertificate(
const std::vector<uint8_t>& certificate,
- scoped_ptr<media::SimpleCdmPromise> promise) override;
+ std::unique_ptr<media::SimpleCdmPromise> promise) override;
void CreateSessionAndGenerateRequest(
SessionType session_type,
media::EmeInitDataType init_data_type,
const std::vector<uint8_t>& init_data,
- scoped_ptr<media::NewSessionCdmPromise> promise) override;
- void LoadSession(SessionType session_type,
- const std::string& session_id,
- scoped_ptr<media::NewSessionCdmPromise> promise) override;
+ std::unique_ptr<media::NewSessionCdmPromise> promise) override;
+ void LoadSession(
+ SessionType session_type,
+ const std::string& session_id,
+ std::unique_ptr<media::NewSessionCdmPromise> promise) override;
void UpdateSession(const std::string& session_id,
const std::vector<uint8_t>& response,
- scoped_ptr<media::SimpleCdmPromise> promise) override;
+ std::unique_ptr<media::SimpleCdmPromise> promise) override;
void CloseSession(const std::string& session_id,
- scoped_ptr<media::SimpleCdmPromise> promise) override;
+ std::unique_ptr<media::SimpleCdmPromise> promise) override;
void RemoveSession(const std::string& session_id,
- scoped_ptr<media::SimpleCdmPromise> promise) override;
+ std::unique_ptr<media::SimpleCdmPromise> promise) override;
CdmContext* GetCdmContext() override;
void DeleteOnCorrectThread() const override;
@@ -311,7 +314,7 @@ class MEDIA_EXPORT MediaDrmBridge : public MediaKeys, public PlayerTracker {
// The ProvisionFetcher that requests and receives provisioning data.
// Non-null iff when a provision request is pending.
- scoped_ptr<ProvisionFetcher> provision_fetcher_;
+ std::unique_ptr<ProvisionFetcher> provision_fetcher_;
// Callbacks for firing session events.
SessionMessageCB session_message_cb_;

Powered by Google App Engine
This is Rietveld 408576698