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

Side by Side Diff: remoting/host/setup/daemon_controller_mac.mm

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | « remoting/host/policy_hack/policy_watcher_mac.mm ('k') | rlz/mac/lib/machine_id_mac.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/setup/daemon_controller.h" 5 #include "remoting/host/setup/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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 OSStatus status = LSOpenFSRef(&pane_path_ref, NULL); 293 OSStatus status = LSOpenFSRef(&pane_path_ref, NULL);
294 if (status != noErr) { 294 if (status != noErr) {
295 OSSTATUS_LOG(ERROR, status) << "LSOpenFSRef failed for path: " 295 OSSTATUS_LOG(ERROR, status) << "LSOpenFSRef failed for path: "
296 << pane_path.value(); 296 << pane_path.value();
297 return false; 297 return false;
298 } 298 }
299 299
300 CFNotificationCenterRef center = 300 CFNotificationCenterRef center =
301 CFNotificationCenterGetDistributedCenter(); 301 CFNotificationCenterGetDistributedCenter();
302 base::mac::ScopedCFTypeRef<CFStringRef> service_name( 302 base::ScopedCFTypeRef<CFStringRef> service_name(CFStringCreateWithCString(
303 CFStringCreateWithCString(kCFAllocatorDefault, remoting::kServiceName, 303 kCFAllocatorDefault, remoting::kServiceName, kCFStringEncodingUTF8));
304 kCFStringEncodingUTF8));
305 CFNotificationCenterPostNotification(center, service_name, NULL, NULL, 304 CFNotificationCenterPostNotification(center, service_name, NULL, NULL,
306 TRUE); 305 TRUE);
307 return true; 306 return true;
308 } 307 }
309 308
310 void DaemonControllerMac::DoStop(const CompletionCallback& done_callback) { 309 void DaemonControllerMac::DoStop(const CompletionCallback& done_callback) {
311 ShowPreferencePane("", done_callback); 310 ShowPreferencePane("", done_callback);
312 } 311 }
313 312
314 // CFNotificationCenterAddObserver ties the thread on which distributed 313 // CFNotificationCenterAddObserver ties the thread on which distributed
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 369 }
371 } 370 }
372 371
373 } // namespace 372 } // namespace
374 373
375 scoped_ptr<DaemonController> remoting::DaemonController::Create() { 374 scoped_ptr<DaemonController> remoting::DaemonController::Create() {
376 return scoped_ptr<DaemonController>(new DaemonControllerMac()); 375 return scoped_ptr<DaemonController>(new DaemonControllerMac());
377 } 376 }
378 377
379 } // namespace remoting 378 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_mac.mm ('k') | rlz/mac/lib/machine_id_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698