Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: media/blink/cdm_session_adapter.h

Issue 2691673002: media: Add UMA to record time to GenerateRequest and LoadSession (Closed)
Patch Set: comments addressed Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/blink/cdm_result_promise_helper.h ('k') | media/blink/cdm_session_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BLINK_CDM_SESSION_ADAPTER_H_ 5 #ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool has_additional_usable_key, 123 bool has_additional_usable_key,
124 CdmKeysInfo keys_info); 124 CdmKeysInfo keys_info);
125 void OnSessionExpirationUpdate(const std::string& session_id, 125 void OnSessionExpirationUpdate(const std::string& session_id,
126 base::Time new_expiry_time); 126 base::Time new_expiry_time);
127 void OnSessionClosed(const std::string& session_id); 127 void OnSessionClosed(const std::string& session_id);
128 128
129 // Helper function of the callbacks. 129 // Helper function of the callbacks.
130 WebContentDecryptionModuleSessionImpl* GetSession( 130 WebContentDecryptionModuleSessionImpl* GetSession(
131 const std::string& session_id); 131 const std::string& session_id);
132 132
133 void ReportTimeToCreateCdmUMA(base::TimeDelta cdm_creation_time) const;
134
135 scoped_refptr<ContentDecryptionModule> cdm_; 133 scoped_refptr<ContentDecryptionModule> cdm_;
136 134
137 SessionMap sessions_; 135 SessionMap sessions_;
138 136
139 std::string key_system_; 137 std::string key_system_;
140 std::string key_system_uma_prefix_; 138 std::string key_system_uma_prefix_;
141 139
142 // A unique ID to trace CdmSessionAdapter::CreateCdm() call and the matching 140 // A unique ID to trace CdmSessionAdapter::CreateCdm() call and the matching
143 // OnCdmCreated() call. 141 // OnCdmCreated() call.
144 uint32_t trace_id_; 142 uint32_t trace_id_;
145 143
146 std::unique_ptr<blink::WebContentDecryptionModuleResult> cdm_created_result_; 144 std::unique_ptr<blink::WebContentDecryptionModuleResult> cdm_created_result_;
147 145
148 // NOTE: Weak pointers must be invalidated before all other member variables. 146 // NOTE: Weak pointers must be invalidated before all other member variables.
149 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; 147 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
150 148
151 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 149 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
152 }; 150 };
153 151
154 } // namespace media 152 } // namespace media
155 153
156 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 154 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
OLDNEW
« no previous file with comments | « media/blink/cdm_result_promise_helper.h ('k') | media/blink/cdm_session_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698