OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/cocoa/install_from_dmg.h" | 5 #include "chrome/browser/cocoa/install_from_dmg.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
10 #include <CoreServices/CoreServices.h> | 10 #include <CoreServices/CoreServices.h> |
(...skipping 19 matching lines...) Expand all Loading... |
30 // |catch| so as to allow exception-expecting C++ code to build properly when | 30 // |catch| so as to allow exception-expecting C++ code to build properly when |
31 // language support for exceptions is not present. These macros interfere | 31 // language support for exceptions is not present. These macros interfere |
32 // with the use of |@try| and |@catch| in Objective-C files such as this one. | 32 // with the use of |@try| and |@catch| in Objective-C files such as this one. |
33 // Undefine these macros here, after everything has been #included, since | 33 // Undefine these macros here, after everything has been #included, since |
34 // there will be no C++ uses and only Objective-C uses from this point on. | 34 // there will be no C++ uses and only Objective-C uses from this point on. |
35 #undef try | 35 #undef try |
36 #undef catch | 36 #undef catch |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 // Just like scoped_cftyperef from base/scoped_cftyperef.h, but for | 40 // Just like ScopedCFTypeRef but for io_object_t and subclasses. |
41 // io_object_t and subclasses. | |
42 template<typename IOT> | 41 template<typename IOT> |
43 class scoped_ioobject { | 42 class scoped_ioobject { |
44 public: | 43 public: |
45 typedef IOT element_type; | 44 typedef IOT element_type; |
46 | 45 |
47 explicit scoped_ioobject(IOT object = NULL) | 46 explicit scoped_ioobject(IOT object = NULL) |
48 : object_(object) { | 47 : object_(object) { |
49 } | 48 } |
50 | 49 |
51 ~scoped_ioobject() { | 50 ~scoped_ioobject() { |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 installer_path, | 429 installer_path, |
431 source_path, | 430 source_path, |
432 target_path) || | 431 target_path) || |
433 !LaunchInstalledApp(target_path)) { | 432 !LaunchInstalledApp(target_path)) { |
434 ShowErrorDialog(); | 433 ShowErrorDialog(); |
435 return false; | 434 return false; |
436 } | 435 } |
437 | 436 |
438 return true; | 437 return true; |
439 } | 438 } |
OLD | NEW |