]> khamidou — GitHub mirrors - electron.git/commitdiff
willInstallUpdateOnQuit has been discarded in latest Sparkle.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 3 Jun 2013 10:15:20 +0000 (18:15 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 3 Jun 2013 10:15:20 +0000 (18:15 +0800)
browser/auto_updater_mac.mm

index 8837f5387a18c86ac209e4f4eb56fa0735946c97..eae85ffc4427c65f540a3b4ac9c66d459d5cc9fe 100644 (file)
@@ -40,20 +40,20 @@ void CallNSInvocation(ScopedNSInvocation invocation) {
 
 @implementation SUUpdaterDelegate
 
-- (void)updater:(SUUpdater*)updater
-        willInstallUpdateOnQuit:(SUAppcastItem*)update
-        immediateInstallationInvocation:(NSInvocation*)invocation {
+- (BOOL)updater:(SUUpdater*)updater
+        shouldPostponeRelaunchForUpdate:(SUAppcastItem*)update
+        untilInvoking:(NSInvocation*)invocation {
   AutoUpdaterDelegate* delegate = auto_updater::AutoUpdater::GetDelegate();
-  if (!delegate) {
-    [invocation invoke];
-    return;
-  }
+  if (!delegate)
+    return NO;
 
   std::string version(base::SysNSStringToUTF8([update versionString]));
   ScopedNSInvocation invocation_ptr([invocation retain]);
   delegate->WillInstallUpdate(
       version,
       base::Bind(&CallNSInvocation, base::Passed(invocation_ptr.Pass())));
+
+  return YES;
 }
 
 @end