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 and | |
72 // the result will be true. Otherwise, the result will be false. | |
yucliu1
2017/04/04 06:50:00
If session_id doesn't exist, this should be true,
xhwang
2017/04/06 22:00:51
Done. No matter what the result is, it seems there
| |
71 virtual void RemovePersistentSession(const std::string& session_id, | 73 virtual void RemovePersistentSession(const std::string& session_id, |
72 ResultCB result_cb) = 0; | 74 ResultCB result_cb) = 0; |
73 | 75 |
74 private: | 76 private: |
75 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); | 77 DISALLOW_COPY_AND_ASSIGN(MediaDrmStorage); |
76 }; | 78 }; |
77 | 79 |
78 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; | 80 using CreateStorageCB = base::Callback<std::unique_ptr<MediaDrmStorage>()>; |
79 | 81 |
80 } // namespace media | 82 } // namespace media |
81 | 83 |
82 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ | 84 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_STORAGE_H_ |
OLD | NEW |