summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 19:41:12 +0000
committermorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 19:41:12 +0000
commitcf178fb755d0fda06fd770c1a94eb8696063c001 (patch)
tree6e78f195f4731ec0231c538fc8377a3a41e8482b /apps
parent7d1c92a65a91100f4cae59626107b7b74aba536b (diff)
downloadchromium_src-cf178fb755d0fda06fd770c1a94eb8696063c001.zip
chromium_src-cf178fb755d0fda06fd770c1a94eb8696063c001.tar.gz
chromium_src-cf178fb755d0fda06fd770c1a94eb8696063c001.tar.bz2
Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*()
This change hides constructors of these classes so that we can turn them polymorphic classes. Note that having almost identical ChannelProxy::Init*() isn't great and they will be replaced by a factory-like abstraction in coming changes. TEST=none R=darin,cpu BUG=377980 Review URL: https://codereview.chromium.org/301973003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/app_shim/app_shim_host_mac.cc5
-rw-r--r--apps/app_shim/app_shim_host_manager_browsertest_mac.mm4
-rw-r--r--apps/app_shim/chrome_main_app_mode_mac.mm7
3 files changed, 6 insertions, 10 deletions
diff --git a/apps/app_shim/app_shim_host_mac.cc b/apps/app_shim/app_shim_host_mac.cc
index 437fb6b..57316e5 100644
--- a/apps/app_shim/app_shim_host_mac.cc
+++ b/apps/app_shim/app_shim_host_mac.cc
@@ -24,12 +24,11 @@ AppShimHost::~AppShimHost() {
void AppShimHost::ServeChannel(const IPC::ChannelHandle& handle) {
DCHECK(CalledOnValidThread());
DCHECK(!channel_.get());
- channel_.reset(new IPC::ChannelProxy(
+ channel_ = IPC::ChannelProxy::CreateServer(
handle,
- IPC::Channel::MODE_SERVER,
this,
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO).get()));
+ content::BrowserThread::IO).get());
}
base::FilePath AppShimHost::GetProfilePath() const {
diff --git a/apps/app_shim/app_shim_host_manager_browsertest_mac.mm b/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
index c97f544..4327e97 100644
--- a/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
+++ b/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
@@ -63,8 +63,8 @@ TestShimClient::TestShimClient() : io_thread_("TestShimClientIO") {
app_mode::VerifySocketPermissions(socket_path);
IPC::ChannelHandle handle(socket_path.value());
- channel_.reset(new IPC::ChannelProxy(handle, IPC::Channel::MODE_NAMED_CLIENT,
- this, io_thread_.message_loop_proxy().get()));
+ channel_ = IPC::ChannelProxy::CreateNamedClient(
+ handle, this, io_thread_.message_loop_proxy().get());
}
TestShimClient::~TestShimClient() {}
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index c04b9a4..ecc18bf 100644
--- a/apps/app_shim/chrome_main_app_mode_mac.mm
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm
@@ -214,11 +214,8 @@ void AppShimController::Init() {
void AppShimController::CreateChannelAndSendLaunchApp(
const base::FilePath& socket_path) {
IPC::ChannelHandle handle(socket_path.value());
- channel_.reset(
- new IPC::ChannelProxy(handle,
- IPC::Channel::MODE_NAMED_CLIENT,
- this,
- g_io_thread->message_loop_proxy().get()));
+ channel_ = IPC::ChannelProxy::CreateNamedClient(
+ handle, this, g_io_thread->message_loop_proxy().get());
bool launched_by_chrome =
CommandLine::ForCurrentProcess()->HasSwitch(