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

Side by Side Diff: apps/app_shim/app_shim_host_manager_browsertest_mac.mm

Issue 301973003: Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build Created 6 years, 6 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 | « apps/app_shim/app_shim_host_mac.cc ('k') | apps/app_shim/chrome_main_app_mode_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_shim/app_shim_host_manager_mac.h" 5 #include "apps/app_shim/app_shim_host_manager_mac.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "apps/app_shim/app_shim_messages.h" 9 #include "apps/app_shim/app_shim_messages.h"
10 #include "apps/app_shim/test/app_shim_host_manager_test_api_mac.h" 10 #include "apps/app_shim/test/app_shim_host_manager_test_api_mac.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 base::FilePath user_data_dir; 56 base::FilePath user_data_dir;
57 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); 57 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
58 base::FilePath symlink_path = 58 base::FilePath symlink_path =
59 user_data_dir.Append(app_mode::kAppShimSocketSymlinkName); 59 user_data_dir.Append(app_mode::kAppShimSocketSymlinkName);
60 60
61 base::FilePath socket_path; 61 base::FilePath socket_path;
62 CHECK(base::ReadSymbolicLink(symlink_path, &socket_path)); 62 CHECK(base::ReadSymbolicLink(symlink_path, &socket_path));
63 app_mode::VerifySocketPermissions(socket_path); 63 app_mode::VerifySocketPermissions(socket_path);
64 64
65 IPC::ChannelHandle handle(socket_path.value()); 65 IPC::ChannelHandle handle(socket_path.value());
66 channel_.reset(new IPC::ChannelProxy(handle, IPC::Channel::MODE_NAMED_CLIENT, 66 channel_ = IPC::ChannelProxy::CreateNamedClient(
67 this, io_thread_.message_loop_proxy().get())); 67 handle, this, io_thread_.message_loop_proxy().get());
68 } 68 }
69 69
70 TestShimClient::~TestShimClient() {} 70 TestShimClient::~TestShimClient() {}
71 71
72 bool TestShimClient::OnMessageReceived(const IPC::Message& message) { 72 bool TestShimClient::OnMessageReceived(const IPC::Message& message) {
73 return true; 73 return true;
74 } 74 }
75 75
76 void TestShimClient::OnChannelError() { 76 void TestShimClient::OnChannelError() {
77 // Client should not get any channel errors for the current set of tests. 77 // Client should not get any channel errors for the current set of tests.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 EXPECT_TRUE(base::PathExists(directory_in_tmp_)); 262 EXPECT_TRUE(base::PathExists(directory_in_tmp_));
263 EXPECT_TRUE(base::PathExists(symlink_path_)); 263 EXPECT_TRUE(base::PathExists(symlink_path_));
264 264
265 // Check that the symlink has been replaced. 265 // Check that the symlink has been replaced.
266 base::FilePath socket_path; 266 base::FilePath socket_path;
267 ASSERT_TRUE(base::ReadSymbolicLink(symlink_path_, &socket_path)); 267 ASSERT_TRUE(base::ReadSymbolicLink(symlink_path_, &socket_path));
268 EXPECT_EQ(app_mode::kAppShimSocketShortName, socket_path.BaseName().value()); 268 EXPECT_EQ(app_mode::kAppShimSocketShortName, socket_path.BaseName().value());
269 } 269 }
270 270
271 } // namespace 271 } // namespace
OLDNEW
« no previous file with comments | « apps/app_shim/app_shim_host_mac.cc ('k') | apps/app_shim/chrome_main_app_mode_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698