Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / common / mac / app_mode_common.mm
blob9c178db5c45f38eed01ce07d5b80c31abfda469a
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
3 // found in the LICENSE file.
5 #include "chrome/common/mac/app_mode_common.h"
7 #include "base/files/file_util.h"
9 namespace app_mode {
11 const char kAppShimSocketShortName[] = "Socket";
12 const char kAppShimSocketSymlinkName[] = "App Shim Socket";
14 const char kRunningChromeVersionSymlinkName[] = "RunningChromeVersion";
16 const char kAppListModeId[] = "app_list";
18 const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id";
19 const char kLaunchedForTest[] = "launched-for-test";
20 const char kLaunchedAfterRebuild[] = "launched-after-rebuild";
22 const char kAppShimError[] = "app-shim-error";
24 NSString* const kCFBundleDocumentTypesKey = @"CFBundleDocumentTypes";
25 NSString* const kCFBundleTypeExtensionsKey = @"CFBundleTypeExtensions";
26 NSString* const kCFBundleTypeIconFileKey = @"CFBundleTypeIconFile";
27 NSString* const kCFBundleTypeNameKey = @"CFBundleTypeName";
28 NSString* const kCFBundleTypeMIMETypesKey = @"CFBundleTypeMIMETypes";
29 NSString* const kCFBundleTypeRoleKey = @"CFBundleTypeRole";
30 NSString* const kBundleTypeRoleViewer = @"Viewer";
32 NSString* const kCFBundleDisplayNameKey = @"CFBundleDisplayName";
33 NSString* const kCFBundleShortVersionStringKey = @"CFBundleShortVersionString";
34 NSString* const kCrBundleVersionKey = @"CrBundleVersion";
35 NSString* const kLSHasLocalizedDisplayNameKey = @"LSHasLocalizedDisplayName";
36 NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier";
37 NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID";
38 NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName";
39 NSString* const kCrAppModeShortcutURLKey = @"CrAppModeShortcutURL";
40 NSString* const kCrAppModeUserDataDirKey = @"CrAppModeUserDataDir";
41 NSString* const kCrAppModeProfileDirKey = @"CrAppModeProfileDir";
42 NSString* const kCrAppModeProfileNameKey = @"CrAppModeProfileName";
44 NSString* const kLastRunAppBundlePathPrefsKey = @"LastRunAppBundlePath";
46 NSString* const kShortcutIdPlaceholder = @"APP_MODE_SHORTCUT_ID";
47 NSString* const kShortcutNamePlaceholder = @"APP_MODE_SHORTCUT_NAME";
48 NSString* const kShortcutURLPlaceholder = @"APP_MODE_SHORTCUT_URL";
49 NSString* const kShortcutBrowserBundleIDPlaceholder =
50                     @"APP_MODE_BROWSER_BUNDLE_ID";
52 ChromeAppModeInfo::ChromeAppModeInfo()
53     : major_version(0),
54       minor_version(0),
55       argc(0),
56       argv(0) {
59 ChromeAppModeInfo::~ChromeAppModeInfo() {
62 void VerifySocketPermissions(const base::FilePath& socket_path) {
63   CHECK(base::PathIsWritable(socket_path));
64   base::FilePath socket_dir = socket_path.DirName();
65   int socket_dir_mode = 0;
66   CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode));
67   CHECK_EQ(0700, socket_dir_mode);
70 }  // namespace app_mode