summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win
diff options
context:
space:
mode:
authormorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 03:58:59 +0000
committermorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 03:58:59 +0000
commite482111a87c5415af8aaf33636f00c650c19b61e (patch)
tree2aaac1052209eb2ff1d1e3be3dac7f9010bef8b7 /cloud_print/service/win
parent1df3479c2fff2122dd136c8eb2838034324fae9e (diff)
downloadchromium_src-e482111a87c5415af8aaf33636f00c650c19b61e.zip
chromium_src-e482111a87c5415af8aaf33636f00c650c19b61e.tar.gz
chromium_src-e482111a87c5415af8aaf33636f00c650c19b61e.tar.bz2
Introduce IPC::Channel::Create*() to ensure it being heap-allocated.
This change introduces IPC::Channel::Create*() API to turn IPC::Channel into a heap allocated object. This will allow us to make Channel a polymorphic class. This change also tries to hide Channel::Mode from public API so that we can simplify channel creation code paths cleaner in following changes. ChannelProxy has to follow same pattern to finish this cleanup. Such changes will follow. TEST=none BUG=377980 R=darin@chromium.org,cpu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273575 Review URL: https://codereview.chromium.org/307653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/win')
-rw-r--r--cloud_print/service/win/service_listener.cc4
-rw-r--r--cloud_print/service/win/setup_listener.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/cloud_print/service/win/service_listener.cc b/cloud_print/service/win/service_listener.cc
index 53622a8..bdb2217 100644
--- a/cloud_print/service/win/service_listener.cc
+++ b/cloud_print/service/win/service_listener.cc
@@ -91,8 +91,8 @@ void ServiceListener::Connect() {
SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION |
FILE_FLAG_OVERLAPPED, NULL));
if (handle.IsValid()) {
- channel_.reset(new IPC::Channel(IPC::ChannelHandle(handle),
- IPC::Channel::MODE_CLIENT, this));
+ channel_ = IPC::Channel::CreateClient(IPC::ChannelHandle(handle),
+ this);
channel_->Connect();
} else {
ipc_thread_->message_loop()->PostDelayedTask(
diff --git a/cloud_print/service/win/setup_listener.cc b/cloud_print/service/win/setup_listener.cc
index dd1cb37..c0b6d1b 100644
--- a/cloud_print/service/win/setup_listener.cc
+++ b/cloud_print/service/win/setup_listener.cc
@@ -117,8 +117,8 @@ void SetupListener::Connect(const base::string16& user) {
IPC::Channel::kReadBufferSize,
IPC::Channel::kReadBufferSize, 5000, &attribs));
if (pipe.IsValid()) {
- channel_.reset(new IPC::Channel(IPC::ChannelHandle(pipe),
- IPC::Channel::MODE_SERVER, this));
+ channel_ = IPC::Channel::CreateServer(IPC::ChannelHandle(pipe),
+ this);
channel_->Connect();
}
}