| 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;
|
| }
|
| }
|
|
|
|
|