| 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. |
| 71 virtual void RemovePersistentSession(const std::string& session_id, | 75 virtual void RemovePersistentSession(const std::string& session_id, |
| 72 ResultCB result_cb) = 0; | 76 ResultCB result_cb) = 0; |
| 73 | 77 |
| 74 private: | 78 private: |
| 75 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); | 79 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; | 82 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; |
| 79 | 83 |
| 80 } // namespace media | 84 } // namespace media |
| 81 | 85 |
| 82 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ | 86 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ |
| OLD | NEW |