override, Don't OVERRIDE
(This is a merge of http://go/wvgerrit/65263) Now that C++11 is mandatory, we can drop the OVERRIDE macro which was inconsistently used in the codebase in favor of using the override keyword directly. Bug: 111851141 Test: CE CDM Unit Tests Test: Android Build Change-Id: I0b7559624b84feb19740afd63463dadd243412b0
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "key_session.h"
|
||||
#include "metrics_collections.h"
|
||||
#include "override.h"
|
||||
#include "timer_metric.h"
|
||||
|
||||
namespace wvcdm {
|
||||
@@ -21,14 +20,14 @@ class ContentKeySession : public KeySession {
|
||||
cipher_mode_(kCipherModeCtr) {}
|
||||
virtual ~ContentKeySession() {}
|
||||
|
||||
virtual KeySessionType Type() OVERRIDE { return kDefault; }
|
||||
virtual KeySessionType Type() override { return kDefault; }
|
||||
|
||||
// Generate Derived Keys for ContentKeySession
|
||||
virtual bool GenerateDerivedKeys(const std::string& message) OVERRIDE;
|
||||
virtual bool GenerateDerivedKeys(const std::string& message) override;
|
||||
|
||||
// Generate Derived Keys (from session key) for ContentKeySession
|
||||
virtual bool GenerateDerivedKeys(const std::string& message,
|
||||
const std::string& session_key) OVERRIDE;
|
||||
const std::string& session_key) override;
|
||||
|
||||
// Load Keys for ContentKeySession
|
||||
virtual OEMCryptoResult LoadKeys(const std::string& message,
|
||||
@@ -38,22 +37,22 @@ class ContentKeySession : public KeySession {
|
||||
const std::vector<CryptoKey>& keys,
|
||||
const std::string& provider_session_token,
|
||||
CdmCipherMode* cipher_mode,
|
||||
const std::string& srm_requirement) OVERRIDE;
|
||||
const std::string& srm_requirement) override;
|
||||
|
||||
virtual OEMCryptoResult LoadEntitledContentKeys(
|
||||
const std::vector<CryptoKey>&) OVERRIDE {
|
||||
const std::vector<CryptoKey>&) override {
|
||||
return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
// Select Key for ContentKeySession
|
||||
virtual OEMCryptoResult SelectKey(const std::string& key_id,
|
||||
CdmCipherMode cipher_mode) OVERRIDE;
|
||||
CdmCipherMode cipher_mode) override;
|
||||
|
||||
// Decrypt for ContentKeySession
|
||||
virtual OEMCryptoResult Decrypt(
|
||||
const CdmDecryptionParameters& params,
|
||||
OEMCrypto_DestBufferDesc& buffer_descriptor,
|
||||
OEMCrypto_CENCEncryptPatternDesc& pattern_descriptor) OVERRIDE;
|
||||
OEMCrypto_CENCEncryptPatternDesc& pattern_descriptor) override;
|
||||
|
||||
protected:
|
||||
virtual OEMCryptoResult LoadKeysAsLicenseType(
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "content_key_session.h"
|
||||
#include "crypto_key.h"
|
||||
#include "metrics_collections.h"
|
||||
#include "override.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
@@ -32,11 +31,11 @@ class EntitlementKeySession : public ContentKeySession {
|
||||
const std::vector<CryptoKey>& keys,
|
||||
const std::string& provider_session_token,
|
||||
CdmCipherMode* cipher_mode,
|
||||
const std::string& srm_requirement) OVERRIDE;
|
||||
const std::string& srm_requirement) override;
|
||||
virtual OEMCryptoResult LoadEntitledContentKeys(
|
||||
const std::vector<CryptoKey>& keys) OVERRIDE;
|
||||
const std::vector<CryptoKey>& keys) override;
|
||||
virtual OEMCryptoResult SelectKey(const std::string& key_id,
|
||||
CdmCipherMode cipher_mode) OVERRIDE;
|
||||
CdmCipherMode cipher_mode) override;
|
||||
|
||||
private:
|
||||
// The object returned by this function contains raw pointers to the passed-in
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine Master
|
||||
// License Agreement.
|
||||
// TODO: Import to core/, use everywhere.
|
||||
#ifndef WVCDM_CDM_OVERRIDE_H_
|
||||
#define WVCDM_CDM_OVERRIDE_H_
|
||||
|
||||
#define GCC_HAS_OVERRIDE ( \
|
||||
(__GNUC__ > 4) || \
|
||||
(__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \
|
||||
)
|
||||
|
||||
#if !defined(DISABLE_OVERRIDE_KEYWORD) && \
|
||||
(defined(COMPILER_MSVC) || defined(__clang__) || GCC_HAS_OVERRIDE)
|
||||
#define OVERRIDE override
|
||||
#else
|
||||
#define OVERRIDE
|
||||
#endif
|
||||
|
||||
#endif // WVCDM_CDM_OVERRIDE_H_
|
||||
Reference in New Issue
Block a user