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 #ifndef CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ |
6 #define CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ | 6 #define CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "media/base/android/media_drm_bridge.h" | 14 #include "media/base/android/media_drm_bridge.h" |
15 #include "media/base/android/provision_fetcher.h" | 15 #include "media/base/provision_fetcher.h" |
16 | 16 |
17 // This class resets the media DRM credentials on Android. | 17 // This class resets the media DRM credentials on Android. |
18 // | 18 // |
19 // Implementation Note: We create a MediaDrmBridge to reset the credentials. | 19 // Implementation Note: We create a MediaDrmBridge to reset the credentials. |
20 // If MediaDrmBridge creation failed, it's likely that the key system or | 20 // If MediaDrmBridge creation failed, it's likely that the key system or |
21 // security level is not supported, hence no credentials need to be reset. | 21 // security level is not supported, hence no credentials need to be reset. |
22 // We treat this as a success. There's a slight chance that MediaDrmBridge | 22 // We treat this as a success. There's a slight chance that MediaDrmBridge |
23 // creation failed due to other reasons, but that should not happen in normal | 23 // creation failed due to other reasons, but that should not happen in normal |
24 // cases. | 24 // cases. |
25 class MediaDrmCredentialManager { | 25 class MediaDrmCredentialManager { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // The MediaDrmBridge object used to perform the credential reset. | 59 // The MediaDrmBridge object used to perform the credential reset. |
60 scoped_refptr<media::MediaDrmBridge> media_drm_bridge_; | 60 scoped_refptr<media::MediaDrmBridge> media_drm_bridge_; |
61 | 61 |
62 // The callback provided by the caller. | 62 // The callback provided by the caller. |
63 ResetCredentialsCB reset_credentials_cb_; | 63 ResetCredentialsCB reset_credentials_cb_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(MediaDrmCredentialManager); | 65 DISALLOW_COPY_AND_ASSIGN(MediaDrmCredentialManager); |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ | 68 #endif // CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_CREDENTIAL_MANAGER_H_ |
OLD | NEW |