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" |
| 8 |
7 namespace app_mode { | 9 namespace app_mode { |
8 | 10 |
9 const char kAppShimSocketName[] = "App Shim Socket"; | 11 const char kAppShimSocketShortName[] = "Socket"; |
| 12 const char kAppShimSocketSymlinkName[] = "App Shim Socket"; |
10 | 13 |
11 const char kAppListModeId[] = "app_list"; | 14 const char kAppListModeId[] = "app_list"; |
12 | 15 |
13 const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id"; | 16 const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id"; |
14 | 17 |
15 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; | 18 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName"; |
16 NSString* const kLSHasLocalizedDisplayNameKey = @"LSHasLocalizedDisplayName"; | 19 NSString* const kLSHasLocalizedDisplayNameKey = @"LSHasLocalizedDisplayName"; |
17 NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier"; | 20 NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier"; |
18 NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID"; | 21 NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID"; |
19 NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName"; | 22 NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName"; |
(...skipping 13 matching lines...) Expand all Loading... |
33 ChromeAppModeInfo::ChromeAppModeInfo() | 36 ChromeAppModeInfo::ChromeAppModeInfo() |
34 : major_version(0), | 37 : major_version(0), |
35 minor_version(0), | 38 minor_version(0), |
36 argc(0), | 39 argc(0), |
37 argv(0) { | 40 argv(0) { |
38 } | 41 } |
39 | 42 |
40 ChromeAppModeInfo::~ChromeAppModeInfo() { | 43 ChromeAppModeInfo::~ChromeAppModeInfo() { |
41 } | 44 } |
42 | 45 |
| 46 void VerifySocketPermissions(const base::FilePath& socket_path) { |
| 47 CHECK(base::PathIsWritable(socket_path)); |
| 48 base::FilePath socket_dir = socket_path.DirName(); |
| 49 int socket_dir_mode = 0; |
| 50 CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); |
| 51 CHECK_EQ(0700, socket_dir_mode); |
| 52 } |
| 53 |
43 } // namespace app_mode | 54 } // namespace app_mode |
OLD | NEW |