Index: chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc |
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc |
index 8b1ab223df94899acef1a7e6c0f55e6b0025d35b..cd2d0582508fd73874928dc8bbd939ce85fc5d13 100644 |
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc |
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc |
@@ -9,9 +9,32 @@ |
#include "base/logging.h" |
#include "base/posix/eintr_wrapper.h" |
#include "base/process_util.h" |
+#include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest.h" |
namespace extensions { |
+namespace { |
+ |
+const char kNativeMessagingDirectory[] = |
+#if defined(OS_MAXOSX) |
Nico
2013/03/20 04:04:27
OS_MAXOSX should be OS_MACOSX (note C instead of X
Sergey Ulanov
2013/03/20 04:25:15
Thanks for catching and fixing it!
Nico
2013/03/20 04:42:51
Sounds good. The master prefs file is right in /Li
|
+ "/Library/Chrome/NativeMessagingHosts"; |
+#else |
+ "/etc/opt/chrome/native-messaging-hosts"; |
+#endif |
+ |
+} // namespace |
+ |
+// static |
+scoped_ptr<NativeMessagingHostManifest> |
+NativeProcessLauncher::FindAndLoadManifest( |
+ const std::string& native_host_name, |
+ std::string* error_message) { |
+ base::FilePath manifest_path = |
+ base::FilePath(kNativeMessagingDirectory).Append( |
+ native_host_name + ".json"); |
+ return NativeMessagingHostManifest::Load(manifest_path, error_message); |
+} |
+ |
// static |
bool NativeProcessLauncher::LaunchNativeProcess( |
const base::FilePath& path, |