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

Side by Side Diff: remoting/host/plugin/daemon_controller_mac.cc

Issue 10825302: mac: Remove more 10.5-only code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak comments Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/pdf_metafile_cg_mac.cc ('k') | remoting/host/video_frame_capturer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/plugin/daemon_controller.h" 5 #include "remoting/host/plugin/daemon_controller.h"
6 6
7 #include <launch.h> 7 #include <launch.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 CFSTR(UPDATE_SUCCEEDED_NOTIFICATION_NAME), 101 CFSTR(UPDATE_SUCCEEDED_NOTIFICATION_NAME),
102 NULL); 102 NULL);
103 CFNotificationCenterRemoveObserver( 103 CFNotificationCenterRemoveObserver(
104 CFNotificationCenterGetDistributedCenter(), 104 CFNotificationCenterGetDistributedCenter(),
105 this, 105 this,
106 CFSTR(UPDATE_FAILED_NOTIFICATION_NAME), 106 CFSTR(UPDATE_FAILED_NOTIFICATION_NAME),
107 NULL); 107 NULL);
108 } 108 }
109 109
110 DaemonController::State DaemonControllerMac::GetState() { 110 DaemonController::State DaemonControllerMac::GetState() {
111 if (!base::mac::IsOSSnowLeopardOrLater()) {
112 return DaemonController::STATE_NOT_IMPLEMENTED;
113 }
114 pid_t job_pid = base::mac::PIDForJob(kServiceName); 111 pid_t job_pid = base::mac::PIDForJob(kServiceName);
115 if (job_pid < 0) { 112 if (job_pid < 0) {
116 return DaemonController::STATE_NOT_INSTALLED; 113 return DaemonController::STATE_NOT_INSTALLED;
117 } else if (job_pid == 0) { 114 } else if (job_pid == 0) {
118 // Service is stopped, or a start attempt failed. 115 // Service is stopped, or a start attempt failed.
119 return DaemonController::STATE_STOPPED; 116 return DaemonController::STATE_STOPPED;
120 } else { 117 } else {
121 return DaemonController::STATE_STARTED; 118 return DaemonController::STATE_STARTED;
122 } 119 }
123 } 120 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 364 }
368 } 365 }
369 366
370 } // namespace 367 } // namespace
371 368
372 scoped_ptr<DaemonController> remoting::DaemonController::Create() { 369 scoped_ptr<DaemonController> remoting::DaemonController::Create() {
373 return scoped_ptr<DaemonController>(new DaemonControllerMac()); 370 return scoped_ptr<DaemonController>(new DaemonControllerMac());
374 } 371 }
375 372
376 } // namespace remoting 373 } // namespace remoting
OLDNEW
« no previous file with comments | « printing/pdf_metafile_cg_mac.cc ('k') | remoting/host/video_frame_capturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698