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

Side by Side Diff: chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc

Issue 12465023: Change native messaging paths on OSX to /Library/Google/Chrome/NativeMessagingHosts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/extensions/api/messaging/native_process_launcher.h" 5 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/posix/eintr_wrapper.h" 10 #include "base/posix/eintr_wrapper.h"
11 #include "base/process_util.h" 11 #include "base/process_util.h"
12 #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest .h" 12 #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest .h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 namespace { 16 namespace {
17 17
18 const char kNativeMessagingDirectory[] = 18 const char kNativeMessagingDirectory[] =
19 #if defined(OS_MACOSX) 19 #if defined(OFFICIAL_BUILD) && defined(OS_MACOSX)
20 "/Library/Chrome/NativeMessagingHosts"; 20 "/Library/Google/Chrome/NativeMessagingHosts";
21 #elif defined(OFFICIAL_BUILD) && !defined(OS_MACOSX)
22 "/etc/opt/chrome/native-messaging-hosts";
23 #elif !defined(OFFICIAL_BUILD) && defined(OS_MACOSX)
24 "/Library/Application Support/Chromium/NativeMessagingHosts";
21 #else 25 #else
22 "/etc/opt/chrome/native-messaging-hosts"; 26 "/etc/chromium/native-messaging-hosts";
23 #endif 27 #endif
24 28
25 } // namespace 29 } // namespace
26 30
27 // static 31 // static
28 scoped_ptr<NativeMessagingHostManifest> 32 scoped_ptr<NativeMessagingHostManifest>
29 NativeProcessLauncher::FindAndLoadManifest( 33 NativeProcessLauncher::FindAndLoadManifest(
30 const std::string& native_host_name, 34 const std::string& native_host_name,
31 std::string* error_message) { 35 std::string* error_message) {
32 base::FilePath manifest_path = 36 base::FilePath manifest_path =
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 write_pipe_read_fd.reset(); 76 write_pipe_read_fd.reset();
73 read_pipe_write_fd.reset(); 77 read_pipe_write_fd.reset();
74 78
75 *read_file = *read_pipe_read_fd.release(); 79 *read_file = *read_pipe_read_fd.release();
76 *write_file = *write_pipe_write_fd.release(); 80 *write_file = *write_pipe_write_fd.release();
77 81
78 return true; 82 return true;
79 } 83 }
80 84
81 } // namespace extensions 85 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698