Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: chrome/common/mac/app_mode_chrome_locator.h

Issue 9351014: Mac app mode: locate Chrome + refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc. fixes Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/mac/app_mode_chrome_locator.h
diff --git a/chrome/common/mac/app_mode_chrome_locator.h b/chrome/common/mac/app_mode_chrome_locator.h
new file mode 100644
index 0000000000000000000000000000000000000000..a122bd7af5a60a59b32fa888bdde3ea7eb1526ba
--- /dev/null
+++ b/chrome/common/mac/app_mode_chrome_locator.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_MAC_APP_MODE_CHROME_LOCATOR_H_
+#define CHROME_COMMON_MAC_APP_MODE_CHROME_LOCATOR_H_
+#pragma once
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include "base/string16.h"
+
+@class NSString;
+
+class FilePath;
+
+namespace app_mode {
+
+// Given a bundle id, return the path of the corresponding bundle.
+// Returns true if the bundle was found, false otherwise.
+bool FindBundleById(NSString* bundle_id, FilePath* out_bundle);
+
+// Given the path to the Chrome bundle, read the following information:
+// |raw_version_str| - Chrome version.
+// |version_path| - |chrome_bundle|/Contents/Versions/|raw_version_str|/
+// |framework_shlib_path| - Path to the chrome framework's shared library (not
+// the framework directory).
+// Returns true if all information read succesfuly, false otherwise.
+bool GetChromeBundleInfo(FilePath& chrome_bundle,
+ string16* raw_version_str,
+ FilePath* version_path,
+ FilePath* framework_shlib_path);
+
+} // namespace app_mode
+
+#endif // CHROME_COMMON_MAC_APP_MODE_CHROME_LOCATOR_H_

Powered by Google App Engine
This is Rietveld 408576698