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

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

Issue 10566013: Detect if user closes the pref-pane without disabling Chromoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unswap lines Created 8 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/me2me_preference_pane.mm ('k') | no next file » | 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 CFNotificationSuspensionBehaviorDeliverImmediately); 341 CFNotificationSuspensionBehaviorDeliverImmediately);
342 } 342 }
343 343
344 void DaemonControllerMac::PreferencePaneCallbackDelegate(CFStringRef name) { 344 void DaemonControllerMac::PreferencePaneCallbackDelegate(CFStringRef name) {
345 AsyncResult result = RESULT_FAILED; 345 AsyncResult result = RESULT_FAILED;
346 if (CFStringCompare(name, CFSTR(kUpdateSucceededNotificationName), 0) == 346 if (CFStringCompare(name, CFSTR(kUpdateSucceededNotificationName), 0) ==
347 kCFCompareEqualTo) { 347 kCFCompareEqualTo) {
348 result = RESULT_OK; 348 result = RESULT_OK;
349 } else if (CFStringCompare(name, CFSTR(kUpdateFailedNotificationName), 0) == 349 } else if (CFStringCompare(name, CFSTR(kUpdateFailedNotificationName), 0) ==
350 kCFCompareEqualTo) { 350 kCFCompareEqualTo) {
351 result = RESULT_CANCELLED; 351 result = RESULT_FAILED;
352 } else { 352 } else {
353 LOG(WARNING) << "Ignoring unexpected notification: " << name; 353 LOG(WARNING) << "Ignoring unexpected notification: " << name;
354 return; 354 return;
355 } 355 }
356 DCHECK(!current_callback_.is_null()); 356 DCHECK(!current_callback_.is_null());
357 current_callback_.Run(result); 357 current_callback_.Run(result);
358 current_callback_.Reset(); 358 current_callback_.Reset();
359 DeregisterForPreferencePaneNotifications(); 359 DeregisterForPreferencePaneNotifications();
360 } 360 }
361 361
(...skipping 10 matching lines...) Expand all
372 } 372 }
373 } 373 }
374 374
375 } // namespace 375 } // namespace
376 376
377 scoped_ptr<DaemonController> remoting::DaemonController::Create() { 377 scoped_ptr<DaemonController> remoting::DaemonController::Create() {
378 return scoped_ptr<DaemonController>(new DaemonControllerMac()); 378 return scoped_ptr<DaemonController>(new DaemonControllerMac());
379 } 379 }
380 380
381 } // namespace remoting 381 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/me2me_preference_pane.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698