| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/media/android/media_drm_credential_manager.h" | 5 #include "content/browser/media/android/media_drm_credential_manager.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 | 35 |
| 36 MediaDrmCredentialManager::MediaDrmCredentialManager() {}; | 36 MediaDrmCredentialManager::MediaDrmCredentialManager() {}; |
| 37 | 37 |
| 38 MediaDrmCredentialManager::~MediaDrmCredentialManager() {}; | 38 MediaDrmCredentialManager::~MediaDrmCredentialManager() {}; |
| 39 | 39 |
| 40 // static | 40 // static |
| 41 MediaDrmCredentialManager* MediaDrmCredentialManager::GetInstance() { | 41 MediaDrmCredentialManager* MediaDrmCredentialManager::GetInstance() { |
| 42 return Singleton<MediaDrmCredentialManager>::get(); | 42 return base::Singleton<MediaDrmCredentialManager>::get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void MediaDrmCredentialManager::ResetCredentials( | 45 void MediaDrmCredentialManager::ResetCredentials( |
| 46 const ResetCredentialsCB& reset_credentials_cb) { | 46 const ResetCredentialsCB& reset_credentials_cb) { |
| 47 // Ignore reset request if one is already in progress. | 47 // Ignore reset request if one is already in progress. |
| 48 if (!reset_credentials_cb_.is_null()) | 48 if (!reset_credentials_cb_.is_null()) |
| 49 return; | 49 return; |
| 50 | 50 |
| 51 reset_credentials_cb_ = reset_credentials_cb; | 51 reset_credentials_cb_ = reset_credentials_cb; |
| 52 | 52 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 media_drm_bridge_->ResetDeviceCredentials(reset_credentials_cb); | 110 media_drm_bridge_->ResetDeviceCredentials(reset_credentials_cb); |
| 111 return true; | 111 return true; |
| 112 } | 112 } |
| 113 | 113 |
| 114 // static | 114 // static |
| 115 bool MediaDrmCredentialManager::RegisterMediaDrmCredentialManager(JNIEnv* env) { | 115 bool MediaDrmCredentialManager::RegisterMediaDrmCredentialManager(JNIEnv* env) { |
| 116 return RegisterNativesImpl(env); | 116 return RegisterNativesImpl(env); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace content | 119 } // namespace content |
| OLD | NEW |