| 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 | 17 |
| 18 NSString* const kCFBundleDocumentTypesKey = @"CFBundleDocumentTypes"; |
| 19 NSString* const kCFBundleTypeExtensionsKey = @"CFBundleTypeExtensions"; |
| 20 NSString* const kCFBundleTypeIconFileKey = @"CFBundleTypeIconFile"; |
| 21 NSString* const kCFBundleTypeNameKey = @"CFBundleTypeName"; |
| 22 NSString* const kCFBundleTypeMIMETypesKey = @"CFBundleTypeMIMETypes"; |
| 23 NSString* const kCFBundleTypeRoleKey = @"CFBundleTypeRole"; |
| 24 NSString* const kBundleTypeRoleViewer = @"Viewer"; |
| 25 |
| 18 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; | 26 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; |
| 19 NSString* const kLSHasLocalizedDisplayNameKey = @"LSHasLocalizedDisplayName"; | 27 NSString* const kLSHasLocalizedDisplayNameKey = @"LSHasLocalizedDisplayName"; |
| 20 NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier"; | 28 NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier"; |
| 21 NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID"; | 29 NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID"; |
| 22 NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName"; | 30 NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName"; |
| 23 NSString* const kCrAppModeShortcutURLKey = @"CrAppModeShortcutURL"; | 31 NSString* const kCrAppModeShortcutURLKey = @"CrAppModeShortcutURL"; |
| 24 NSString* const kCrAppModeUserDataDirKey = @"CrAppModeUserDataDir"; | 32 NSString* const kCrAppModeUserDataDirKey = @"CrAppModeUserDataDir"; |
| 25 NSString* const kCrAppModeProfileDirKey = @"CrAppModeProfileDir"; | 33 NSString* const kCrAppModeProfileDirKey = @"CrAppModeProfileDir"; |
| 26 NSString* const kCrAppModeProfileNameKey = @"CrAppModeProfileName"; | 34 NSString* const kCrAppModeProfileNameKey = @"CrAppModeProfileName"; |
| 27 | 35 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 | 53 |
| 46 void VerifySocketPermissions(const base::FilePath& socket_path) { | 54 void VerifySocketPermissions(const base::FilePath& socket_path) { |
| 47 CHECK(base::PathIsWritable(socket_path)); | 55 CHECK(base::PathIsWritable(socket_path)); |
| 48 base::FilePath socket_dir = socket_path.DirName(); | 56 base::FilePath socket_dir = socket_path.DirName(); |
| 49 int socket_dir_mode = 0; | 57 int socket_dir_mode = 0; |
| 50 CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); | 58 CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); |
| 51 CHECK_EQ(0700, socket_dir_mode); | 59 CHECK_EQ(0700, socket_dir_mode); |
| 52 } | 60 } |
| 53 | 61 |
| 54 } // namespace app_mode | 62 } // namespace app_mode |
| OLD | NEW |