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

Unified Diff: remoting/host/curtain_mode_mac.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/curtain_mode_linux.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/curtain_mode_mac.cc
diff --git a/remoting/host/curtain_mode_mac.cc b/remoting/host/curtain_mode_mac.cc
index b0718e88364bf29ebcc86699ea8c3aa30413ed06..cae8e704dfa1e202cc1380b841e2e830548603b6 100644
--- a/remoting/host/curtain_mode_mac.cc
+++ b/remoting/host/curtain_mode_mac.cc
@@ -84,7 +84,7 @@ SessionWatcher::SessionWatcher(
: caller_task_runner_(caller_task_runner),
ui_task_runner_(ui_task_runner),
client_session_control_(client_session_control),
- event_handler_(NULL) {
+ event_handler_(nullptr) {
}
void SessionWatcher::Start() {
@@ -137,14 +137,14 @@ void SessionWatcher::ActivateCurtain() {
base::ScopedCFTypeRef<CFDictionaryRef> session(
CGSessionCopyCurrentDictionary());
- // CGSessionCopyCurrentDictionary has been observed to return NULL in some
+ // CGSessionCopyCurrentDictionary has been observed to return nullptr in some
// cases. Once the system is in this state, curtain mode will fail as the
// CGSession command thinks the session is not attached to the console. The
// only known remedy is logout or reboot. Since we're not sure what causes
// this, or how common it is, a crash report is useful in this case (note
// that the connection would have to be refused in any case, so this is no
// loss of functionality).
- CHECK(session != NULL);
+ CHECK(session != nullptr);
const void* on_console = CFDictionaryGetValue(session,
kCGSessionOnConsoleKey);
@@ -152,7 +152,7 @@ void SessionWatcher::ActivateCurtain() {
if (logged_in == kCFBooleanTrue && on_console == kCFBooleanTrue) {
pid_t child = fork();
if (child == 0) {
- execl(kCGSessionPath, kCGSessionPath, "-suspend", NULL);
+ execl(kCGSessionPath, kCGSessionPath, "-suspend", nullptr);
_exit(1);
} else if (child > 0) {
int status = 0;
@@ -181,7 +181,7 @@ bool SessionWatcher::InstallEventHandler() {
NewEventHandlerUPP(SessionActivateHandler), 1, &event, this,
&event_handler_);
if (result != noErr) {
- event_handler_ = NULL;
+ event_handler_ = nullptr;
DisconnectSession();
return false;
}
@@ -194,7 +194,7 @@ void SessionWatcher::RemoveEventHandler() {
if (event_handler_) {
::RemoveEventHandler(event_handler_);
- event_handler_ = NULL;
+ event_handler_ = nullptr;
}
}
« no previous file with comments | « remoting/host/curtain_mode_linux.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698