| 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/common/mac/app_mode_common.h" | 5 #include "chrome/common/mac/app_mode_common.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 | 8 |
| 9 namespace app_mode { | 9 namespace app_mode { |
| 10 | 10 |
| 11 const char kAppShimSocketShortName[] = "Socket"; | 11 const char kAppShimSocketShortName[] = "Socket"; |
| 12 const char kAppShimSocketSymlinkName[] = "App Shim Socket"; | 12 const char kAppShimSocketSymlinkName[] = "App Shim Socket"; |
| 13 | 13 |
| 14 const char kAppListModeId[] = "app_list"; | 14 const char kAppListModeId[] = "app_list"; |
| 15 | 15 |
| 16 const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id"; | 16 const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id"; |
| 17 const char kLaunchedForTest[] = "launched-for-test"; | 17 const char kLaunchedForTest[] = "launched-for-test"; |
| 18 const char kLaunchedAfterRebuild[] = "launched-after-rebuild"; | 18 const char kLaunchedAfterRebuild[] = "launched-after-rebuild"; |
| 19 | 19 |
| 20 const char kAppShimError[] = "app-shim-error"; | 20 const char kAppShimError[] = "app-shim-error"; |
| 21 const char kAppShimErrorDetail[] = "app-shim-error-detail"; |
| 22 const char kAppShimErrorDetail32Bit[] = "32-bit"; |
| 23 const char kAppShimErrorDetail64Bit[] = "64-bit"; |
| 21 | 24 |
| 22 NSString* const kCFBundleDocumentTypesKey = @"CFBundleDocumentTypes"; | 25 NSString* const kCFBundleDocumentTypesKey = @"CFBundleDocumentTypes"; |
| 23 NSString* const kCFBundleTypeExtensionsKey = @"CFBundleTypeExtensions"; | 26 NSString* const kCFBundleTypeExtensionsKey = @"CFBundleTypeExtensions"; |
| 24 NSString* const kCFBundleTypeIconFileKey = @"CFBundleTypeIconFile"; | 27 NSString* const kCFBundleTypeIconFileKey = @"CFBundleTypeIconFile"; |
| 25 NSString* const kCFBundleTypeNameKey = @"CFBundleTypeName"; | 28 NSString* const kCFBundleTypeNameKey = @"CFBundleTypeName"; |
| 26 NSString* const kCFBundleTypeMIMETypesKey = @"CFBundleTypeMIMETypes"; | 29 NSString* const kCFBundleTypeMIMETypesKey = @"CFBundleTypeMIMETypes"; |
| 27 NSString* const kCFBundleTypeRoleKey = @"CFBundleTypeRole"; | 30 NSString* const kCFBundleTypeRoleKey = @"CFBundleTypeRole"; |
| 28 NSString* const kBundleTypeRoleViewer = @"Viewer"; | 31 NSString* const kBundleTypeRoleViewer = @"Viewer"; |
| 29 | 32 |
| 30 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; | 33 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 57 | 60 |
| 58 void VerifySocketPermissions(const base::FilePath& socket_path) { | 61 void VerifySocketPermissions(const base::FilePath& socket_path) { |
| 59 CHECK(base::PathIsWritable(socket_path)); | 62 CHECK(base::PathIsWritable(socket_path)); |
| 60 base::FilePath socket_dir = socket_path.DirName(); | 63 base::FilePath socket_dir = socket_path.DirName(); |
| 61 int socket_dir_mode = 0; | 64 int socket_dir_mode = 0; |
| 62 CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); | 65 CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); |
| 63 CHECK_EQ(0700, socket_dir_mode); | 66 CHECK_EQ(0700, socket_dir_mode); |
| 64 } | 67 } |
| 65 | 68 |
| 66 } // namespace app_mode | 69 } // namespace app_mode |
| OLD | NEW |