OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual void SavePersistentSession(const std::string& session_id, | 61 virtual void SavePersistentSession(const std::string& session_id, |
62 const SessionData& session_data, | 62 const SessionData& session_data, |
63 ResultCB result_cb) = 0; | 63 ResultCB result_cb) = 0; |
64 | 64 |
65 // Loads the persistent session info for |session_id| from the storage. | 65 // Loads the persistent session info for |session_id| from the storage. |
66 virtual void LoadPersistentSession( | 66 virtual void LoadPersistentSession( |
67 const std::string& session_id, | 67 const std::string& session_id, |
68 LoadPersistentSessionCB load_persistent_session_cb) = 0; | 68 LoadPersistentSessionCB load_persistent_session_cb) = 0; |
69 | 69 |
70 // Removes the persistent session info for |session_id| from the storage. | 70 // Removes the persistent session info for |session_id| from the storage. |
71 // If the session for |session_id| exists in the storage, it is removed. | |
72 // Otherwise, this call is a no-op. In both cases, the result will be true. | |
73 // The result will be false on other unexpected errors, e.g. connection error | |
74 // to the storage backend. | |
75 virtual void RemovePersistentSession(const std::string& session_id, | 71 virtual void RemovePersistentSession(const std::string& session_id, |
76 ResultCB result_cb) = 0; | 72 ResultCB result_cb) = 0; |
77 | 73 |
78 private: | 74 private: |
79 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); | 75 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); |
80 }; | 76 }; |
81 | 77 |
82 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; | 78 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; |
83 | 79 |
84 } // namespace media | 80 } // namespace media |
85 | 81 |
86 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ | 82 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ |
OLD | NEW |