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 #include "chrome/browser/mac/install_from_dmg.h" | 5 #include "chrome/browser/mac/install_from_dmg.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
10 #include <CoreServices/CoreServices.h> | 10 #include <CoreServices/CoreServices.h> |
11 #include <DiskArbitration/DiskArbitration.h> | 11 #include <DiskArbitration/DiskArbitration.h> |
12 #include <IOKit/IOKitLib.h> | 12 #include <IOKit/IOKitLib.h> |
13 #include <signal.h> | 13 #include <signal.h> |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <string.h> | 15 #include <string.h> |
| 16 #include <sys/mount.h> |
16 #include <sys/param.h> | 17 #include <sys/param.h> |
17 #include <sys/mount.h> | |
18 | 18 |
19 #include "base/auto_reset.h" | 19 #include "base/auto_reset.h" |
20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
22 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
23 #include "base/logging.h" | 23 #include "base/logging.h" |
24 #include "base/mac/authorization_util.h" | 24 #include "base/mac/authorization_util.h" |
25 #include "base/mac/bundle_locations.h" | 25 #include "base/mac/bundle_locations.h" |
26 #include "base/mac/mac_logging.h" | 26 #include "base/mac/mac_logging.h" |
| 27 #import "base/mac/mac_util.h" |
27 #include "base/mac/mach_logging.h" | 28 #include "base/mac/mach_logging.h" |
28 #import "base/mac/mac_util.h" | |
29 #include "base/mac/scoped_authorizationref.h" | 29 #include "base/mac/scoped_authorizationref.h" |
30 #include "base/mac/scoped_cftyperef.h" | 30 #include "base/mac/scoped_cftyperef.h" |
31 #include "base/mac/scoped_ioobject.h" | 31 #include "base/mac/scoped_ioobject.h" |
32 #include "base/mac/scoped_nsautorelease_pool.h" | 32 #include "base/mac/scoped_nsautorelease_pool.h" |
33 #include "base/strings/string_util.h" | 33 #include "base/strings/string_util.h" |
34 #include "base/strings/sys_string_conversions.h" | 34 #include "base/strings/sys_string_conversions.h" |
35 #include "chrome/browser/mac/dock.h" | 35 #include "chrome/browser/mac/dock.h" |
36 #import "chrome/browser/mac/keystone_glue.h" | 36 #import "chrome/browser/mac/keystone_glue.h" |
37 #include "chrome/browser/mac/relauncher.h" | 37 #include "chrome/browser/mac/relauncher.h" |
38 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
39 #include "grit/chromium_strings.h" | 39 #include "chrome/grit/chromium_strings.h" |
40 #include "grit/generated_resources.h" | 40 #include "chrome/grit/generated_resources.h" |
41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
42 #include "ui/base/l10n/l10n_util_mac.h" | 42 #include "ui/base/l10n/l10n_util_mac.h" |
43 | 43 |
44 // When C++ exceptions are disabled, the C++ library defines |try| and | 44 // When C++ exceptions are disabled, the C++ library defines |try| and |
45 // |catch| so as to allow exception-expecting C++ code to build properly when | 45 // |catch| so as to allow exception-expecting C++ code to build properly when |
46 // language support for exceptions is not present. These macros interfere | 46 // language support for exceptions is not present. These macros interfere |
47 // with the use of |@try| and |@catch| in Objective-C files such as this one. | 47 // with the use of |@try| and |@catch| in Objective-C files such as this one. |
48 // Undefine these macros here, after everything has been #included, since | 48 // Undefine these macros here, after everything has been #included, since |
49 // there will be no C++ uses and only Objective-C uses from this point on. | 49 // there will be no C++ uses and only Objective-C uses from this point on. |
50 #undef try | 50 #undef try |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 const UInt8* trash_path_u8 = reinterpret_cast<const UInt8*>( | 678 const UInt8* trash_path_u8 = reinterpret_cast<const UInt8*>( |
679 trash_path.value().c_str()); | 679 trash_path.value().c_str()); |
680 status = FNNotifyByPath(trash_path_u8, | 680 status = FNNotifyByPath(trash_path_u8, |
681 kFNDirectoryModifiedMessage, | 681 kFNDirectoryModifiedMessage, |
682 kNilOptions); | 682 kNilOptions); |
683 if (status != noErr) { | 683 if (status != noErr) { |
684 OSSTATUS_LOG(ERROR, status) << "FNNotifyByPath"; | 684 OSSTATUS_LOG(ERROR, status) << "FNNotifyByPath"; |
685 return; | 685 return; |
686 } | 686 } |
687 } | 687 } |
OLD | NEW |