Change from custom Lock to std::mutex.
[ Merge of http://go/wvgerrit/67884 ] Now that we can use C++11, we should use the cross-platform std::mutex type, not the custom pthread version. Bug: 111850982 Test: WV unit/integration tests Change-Id: If2fde2836826c5184609e6b1f3a6511206bd4594
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include <utils/RefBase.h>
|
||||
|
||||
#include "cdm_identifier.h"
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "file_store.h"
|
||||
#include "lock.h"
|
||||
#include "metrics.pb.h"
|
||||
#include "timer.h"
|
||||
#include "wv_cdm_types.h"
|
||||
@@ -165,14 +165,14 @@ class WvContentDecryptionModule : public android::RefBase, public TimerHandler {
|
||||
void DisablePolicyTimer();
|
||||
void OnTimerEvent();
|
||||
|
||||
static Lock session_sharing_id_generation_lock_;
|
||||
Lock policy_timer_lock_;
|
||||
static std::mutex session_sharing_id_generation_lock_;
|
||||
std::mutex policy_timer_lock_;
|
||||
Timer policy_timer_;
|
||||
|
||||
// instance variables
|
||||
// This manages the lifetime of the CDM instances.
|
||||
std::map<CdmIdentifier, CdmInfo> cdms_;
|
||||
Lock cdms_lock_;
|
||||
std::mutex cdms_lock_;
|
||||
|
||||
// This contains weak pointers to the CDM instances contained in |cdms_|.
|
||||
std::map<std::string, CdmEngine*> cdm_by_session_id_;
|
||||
|
||||
Reference in New Issue
Block a user