| OLD | NEW |
| 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 #import "chrome/browser/mac/keystone_glue.h" | 5 #import "chrome/browser/mac/keystone_glue.h" |
| 6 | 6 |
| 7 #include <sys/mount.h> | 7 #include <sys/mount.h> |
| 8 #include <sys/param.h> | 8 #include <sys/param.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Call |sel| on |target| with |arg| in a WorkerPool thread. | 67 // Call |sel| on |target| with |arg| in a WorkerPool thread. |
| 68 // |target| and |arg| are retained, |arg| may be |nil|. | 68 // |target| and |arg| are retained, |arg| may be |nil|. |
| 69 static void PostPerform(id target, SEL sel, id arg) { | 69 static void PostPerform(id target, SEL sel, id arg) { |
| 70 DCHECK(target); | 70 DCHECK(target); |
| 71 DCHECK(sel); | 71 DCHECK(sel); |
| 72 | 72 |
| 73 scoped_refptr<PerformBridge> op = new PerformBridge(target, sel, arg); | 73 scoped_refptr<PerformBridge> op = new PerformBridge(target, sel, arg); |
| 74 base::PostTaskWithTraits( | 74 base::PostTaskWithTraits( |
| 75 FROM_HERE, base::TaskTraits() | 75 FROM_HERE, base::TaskTraits() |
| 76 .WithFileIO() | 76 .MayBlock() |
| 77 .WithPriority(base::TaskPriority::BACKGROUND) | 77 .WithPriority(base::TaskPriority::BACKGROUND) |
| 78 .WithShutdownBehavior( | 78 .WithShutdownBehavior( |
| 79 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), | 79 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), |
| 80 base::Bind(&PerformBridge::Run, op.get())); | 80 base::Bind(&PerformBridge::Run, op.get())); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // Convenience for the no-argument case. | 83 // Convenience for the no-argument case. |
| 84 static void PostPerform(id target, SEL sel) { | 84 static void PostPerform(id target, SEL sel) { |
| 85 PostPerform(target, sel, nil); | 85 PostPerform(target, sel, nil); |
| 86 } | 86 } |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 return [KeystoneGlue defaultKeystoneGlue] != nil; | 1199 return [KeystoneGlue defaultKeystoneGlue] != nil; |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 base::string16 CurrentlyInstalledVersion() { | 1202 base::string16 CurrentlyInstalledVersion() { |
| 1203 KeystoneGlue* keystoneGlue = [KeystoneGlue defaultKeystoneGlue]; | 1203 KeystoneGlue* keystoneGlue = [KeystoneGlue defaultKeystoneGlue]; |
| 1204 NSString* version = [keystoneGlue currentlyInstalledVersion]; | 1204 NSString* version = [keystoneGlue currentlyInstalledVersion]; |
| 1205 return base::SysNSStringToUTF16(version); | 1205 return base::SysNSStringToUTF16(version); |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 } // namespace keystone_glue | 1208 } // namespace keystone_glue |
| OLD | NEW |