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

Unified Diff: Source/modules/encryptedmedia/MediaKeys.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/encoding/TextEncoder.cpp ('k') | Source/modules/filesystem/DOMFileSystem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeys.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeys.cpp b/Source/modules/encryptedmedia/MediaKeys.cpp
index b3fb8c10b02d984d4a1e16dd2c8e33115956504f..276570de84ec3a84de0a1c79789945ff73b84b51 100644
--- a/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -49,13 +49,13 @@ PassRefPtrWillBeRawPtr<MediaKeys> MediaKeys::create(ExecutionContext* context, c
// 1. If keySystem is null or an empty string, throw an InvalidAccessError exception and abort these steps.
if (keySystem.isEmpty()) {
exceptionState.throwDOMException(InvalidAccessError, "The key system provided is invalid.");
- return 0;
+ return nullptr;
}
// 2. If keySystem is not one of the user agent's supported Key Systems, throw a NotSupportedError and abort these steps.
if (!ContentDecryptionModule::supportsKeySystem(keySystem)) {
exceptionState.throwDOMException(NotSupportedError, "The '" + keySystem + "' key system is not supported.");
- return 0;
+ return nullptr;
}
// 3. Let cdm be the content decryption module corresponding to keySystem.
@@ -63,7 +63,7 @@ PassRefPtrWillBeRawPtr<MediaKeys> MediaKeys::create(ExecutionContext* context, c
OwnPtr<ContentDecryptionModule> cdm = ContentDecryptionModule::create(keySystem);
if (!cdm) {
exceptionState.throwDOMException(NotSupportedError, "A content decryption module could not be loaded for the '" + keySystem + "' key system.");
- return 0;
+ return nullptr;
}
// 5. Create a new MediaKeys object.
@@ -98,19 +98,19 @@ PassRefPtrWillBeRawPtr<MediaKeySession> MediaKeys::createSession(ExecutionContex
if (contentType.isEmpty()) {
exceptionState.throwDOMException(InvalidAccessError, "The contentType provided ('" + contentType + "') is empty.");
- return 0;
+ return nullptr;
}
if (!initData || !initData->length()) {
exceptionState.throwDOMException(InvalidAccessError, "The initData provided is null or empty.");
- return 0;
+ return nullptr;
}
// 1. If type contains a MIME type that is not supported or is not supported by the keySystem,
// throw a NOT_SUPPORTED_ERR exception and abort these steps.
if (!m_cdm->supportsMIMEType(contentType)) {
exceptionState.throwDOMException(NotSupportedError, "The type provided ('" + contentType + "') is unsupported.");
- return 0;
+ return nullptr;
}
// 2. Create a new MediaKeySession object.
« no previous file with comments | « Source/modules/encoding/TextEncoder.cpp ('k') | Source/modules/filesystem/DOMFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698