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

Unified Diff: extensions/browser/api/socket/tls_socket.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: extensions/browser/api/socket/tls_socket.cc
diff --git a/extensions/browser/api/socket/tls_socket.cc b/extensions/browser/api/socket/tls_socket.cc
index 3b037dfea9608a7e9283a1b7adfbfc0a7197dac8..eb4f577dbe1f76f39b30ad22afc985f4e8d5490b 100644
--- a/extensions/browser/api/socket/tls_socket.cc
+++ b/extensions/browser/api/socket/tls_socket.cc
@@ -94,17 +94,17 @@ void TLSSocket::Read(int count, const ReadCompletionCallback& callback) {
DCHECK(!callback.is_null());
if (!read_callback_.is_null()) {
- callback.Run(net::ERR_IO_PENDING, NULL);
+ callback.Run(net::ERR_IO_PENDING, nullptr);
return;
}
if (count <= 0) {
- callback.Run(net::ERR_INVALID_ARGUMENT, NULL);
+ callback.Run(net::ERR_INVALID_ARGUMENT, nullptr);
return;
}
if (!tls_socket_.get() || !IsConnected()) {
- callback.Run(net::ERR_SOCKET_NOT_CONNECTED, NULL);
+ callback.Run(net::ERR_SOCKET_NOT_CONNECTED, nullptr);
return;
}
@@ -156,7 +156,7 @@ int TLSSocket::Listen(const std::string& address,
}
void TLSSocket::Accept(const AcceptCompletionCallback& callback) {
- callback.Run(net::ERR_FAILED, NULL);
+ callback.Run(net::ERR_FAILED, nullptr);
}
bool TLSSocket::IsConnected() {
@@ -287,7 +287,7 @@ void TLSSocket::UpgradeSocketToTLS(
base::Callback<void(int)> connect_cb(base::Bind(
&TlsConnectDone, base::Passed(&ssl_socket), extension_id, callback));
int status = saved_ssl_socket->Connect(connect_cb);
- saved_ssl_socket = NULL;
+ saved_ssl_socket = nullptr;
// Connect completed synchronously, or failed.
if (status != net::ERR_IO_PENDING) {

Powered by Google App Engine
This is Rietveld 408576698