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

Unified Diff: remoting/host/cast_extension_session.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « remoting/host/cast_extension_session.h ('k') | remoting/host/cast_video_capturer_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/cast_extension_session.cc
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
index 140b41d3baeda2425ccafd49245473b9ea449170..72d1e9ead834da38396f9c3cff67da70c7f1ada2 100644
--- a/remoting/host/cast_extension_session.cc
+++ b/remoting/host/cast_extension_session.cc
@@ -96,7 +96,7 @@ class CastCreateSessionDescriptionObserver
session);
}
void OnSuccess(webrtc::SessionDescriptionInterface* desc) override {
- if (cast_extension_session_ == NULL) {
+ if (cast_extension_session_ == nullptr) {
LOG(ERROR)
<< "No CastExtensionSession. Creating session description succeeded.";
return;
@@ -104,7 +104,7 @@ class CastCreateSessionDescriptionObserver
cast_extension_session_->OnCreateSessionDescription(desc);
}
void OnFailure(const std::string& error) override {
- if (cast_extension_session_ == NULL) {
+ if (cast_extension_session_ == nullptr) {
LOG(ERROR)
<< "No CastExtensionSession. Creating session description failed.";
return;
@@ -162,7 +162,7 @@ CastExtensionSession::~CastExtensionSession() {
// Explicitly clear |create_session_desc_observer_|'s pointer to |this|,
// since the CastExtensionSession is destructing. Otherwise,
// |create_session_desc_observer_| would be left with a dangling pointer.
- create_session_desc_observer_->SetCastExtensionSession(NULL);
+ create_session_desc_observer_->SetCastExtensionSession(nullptr);
CleanupPeerConnection();
}
@@ -239,7 +239,7 @@ void CastExtensionSession::OnCreateVideoCapturer(
if (received_offer_) {
has_grabbed_capturer_ = true;
if (SetupVideoStream(capturer->Pass())) {
- peer_connection_->CreateAnswer(create_session_desc_observer_, NULL);
+ peer_connection_->CreateAnswer(create_session_desc_observer_, nullptr);
} else {
has_grabbed_capturer_ = false;
// Ignore the received offer, since we failed to setup a video stream.
@@ -313,8 +313,8 @@ CastExtensionSession::CastExtensionSession(
stats_observer_(CastStatsObserver::Create()),
received_offer_(false),
has_grabbed_capturer_(false),
- signaling_thread_wrapper_(NULL),
- worker_thread_wrapper_(NULL),
+ signaling_thread_wrapper_(nullptr),
+ worker_thread_wrapper_(nullptr),
worker_thread_(kWorkerThreadName) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
DCHECK(url_request_context_getter_.get());
@@ -331,7 +331,7 @@ CastExtensionSession::CastExtensionSession(
bool CastExtensionSession::ParseAndSetRemoteDescription(
base::DictionaryValue* message) {
- DCHECK(peer_connection_.get() != NULL);
+ DCHECK(peer_connection_.get() != nullptr);
base::DictionaryValue* message_data;
if (!message->GetDictionary(kTopLevelData, &message_data)) {
@@ -369,7 +369,7 @@ bool CastExtensionSession::ParseAndSetRemoteDescription(
bool CastExtensionSession::ParseAndAddICECandidate(
base::DictionaryValue* message) {
- DCHECK(peer_connection_.get() != NULL);
+ DCHECK(peer_connection_.get() != nullptr);
base::DictionaryValue* message_data;
if (!message->GetDictionary(kTopLevelData, &message_data)) {
@@ -409,7 +409,7 @@ bool CastExtensionSession::SendMessageToClient(const std::string& subject,
const std::string& data) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
- if (client_stub_ == NULL) {
+ if (client_stub_ == nullptr) {
LOG(ERROR) << "No Client Stub. Cannot send message to client.";
return false;
}
@@ -437,7 +437,7 @@ void CastExtensionSession::EnsureTaskAndSetSend(rtc::Thread** ptr,
jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true);
*ptr = jingle_glue::JingleThreadWrapper::current();
- if (event != NULL) {
+ if (event != nullptr) {
event->Signal();
}
}
@@ -446,7 +446,7 @@ bool CastExtensionSession::WrapTasksAndSave() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
EnsureTaskAndSetSend(&signaling_thread_wrapper_);
- if (signaling_thread_wrapper_ == NULL)
+ if (signaling_thread_wrapper_ == nullptr)
return false;
base::WaitableEvent wrap_worker_thread_event(true, false);
@@ -458,18 +458,19 @@ bool CastExtensionSession::WrapTasksAndSave() {
&wrap_worker_thread_event));
wrap_worker_thread_event.Wait();
- return (worker_thread_wrapper_ != NULL);
+ return (worker_thread_wrapper_ != nullptr);
}
bool CastExtensionSession::InitializePeerConnection() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
DCHECK(!peer_conn_factory_);
DCHECK(!peer_connection_);
- DCHECK(worker_thread_wrapper_ != NULL);
- DCHECK(signaling_thread_wrapper_ != NULL);
+ DCHECK(worker_thread_wrapper_ != nullptr);
+ DCHECK(signaling_thread_wrapper_ != nullptr);
peer_conn_factory_ = webrtc::CreatePeerConnectionFactory(
- worker_thread_wrapper_, signaling_thread_wrapper_, NULL, NULL, NULL);
+ worker_thread_wrapper_, signaling_thread_wrapper_, nullptr, nullptr,
+ nullptr);
if (!peer_conn_factory_.get()) {
CleanupPeerConnection();
@@ -499,7 +500,7 @@ bool CastExtensionSession::InitializePeerConnection() {
network_settings_, url_request_context_getter_);
peer_connection_ = peer_conn_factory_->CreatePeerConnection(
- rtc_config, &constraints, port_allocator_factory, NULL, this);
+ rtc_config, &constraints, port_allocator_factory, nullptr, this);
if (!peer_connection_.get()) {
CleanupPeerConnection();
@@ -572,14 +573,14 @@ void CastExtensionSession::PollPeerConnectionStats() {
void CastExtensionSession::CleanupPeerConnection() {
peer_connection_->Close();
- peer_connection_ = NULL;
- stream_ = NULL;
- peer_conn_factory_ = NULL;
+ peer_connection_ = nullptr;
+ stream_ = nullptr;
+ peer_conn_factory_ = nullptr;
worker_thread_.Stop();
}
bool CastExtensionSession::connection_active() const {
- return peer_connection_.get() != NULL;
+ return peer_connection_.get() != nullptr;
}
// webrtc::PeerConnectionObserver implementation -------------------------------
« no previous file with comments | « remoting/host/cast_extension_session.h ('k') | remoting/host/cast_video_capturer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698