Mojo: Get rid of some unneeded namespace qualifiers in mojo/embedder/.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/472903002

Cr-Commit-Position: refs/heads/master@{#289627}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289627 0039d316-1c4b-4281-b951-d872f2087c98
parent 85807e83
...@@ -19,20 +19,18 @@ ChannelInit::~ChannelInit() { ...@@ -19,20 +19,18 @@ ChannelInit::~ChannelInit() {
DestroyChannel(channel_info_); DestroyChannel(channel_info_);
} }
mojo::ScopedMessagePipeHandle ChannelInit::Init( ScopedMessagePipeHandle ChannelInit::Init(
base::PlatformFile file, base::PlatformFile file,
scoped_refptr<base::TaskRunner> io_thread_task_runner) { scoped_refptr<base::TaskRunner> io_thread_task_runner) {
DCHECK(!io_thread_task_runner_.get()); // Should only init once. DCHECK(!io_thread_task_runner_.get()); // Should only init once.
io_thread_task_runner_ = io_thread_task_runner; io_thread_task_runner_ = io_thread_task_runner;
mojo::ScopedMessagePipeHandle message_pipe = ScopedMessagePipeHandle message_pipe =
mojo::embedder::CreateChannel( CreateChannel(ScopedPlatformHandle(PlatformHandle(file)),
mojo::embedder::ScopedPlatformHandle( io_thread_task_runner,
mojo::embedder::PlatformHandle(file)), base::Bind(&ChannelInit::OnCreatedChannel,
io_thread_task_runner, weak_factory_.GetWeakPtr(),
base::Bind(&ChannelInit::OnCreatedChannel, io_thread_task_runner),
weak_factory_.GetWeakPtr(), base::MessageLoop::current()->message_loop_proxy()).Pass();
io_thread_task_runner),
base::MessageLoop::current()->message_loop_proxy()).Pass();
return message_pipe.Pass(); return message_pipe.Pass();
} }
...@@ -44,7 +42,7 @@ void ChannelInit::WillDestroySoon() { ...@@ -44,7 +42,7 @@ void ChannelInit::WillDestroySoon() {
// static // static
void ChannelInit::OnCreatedChannel(base::WeakPtr<ChannelInit> self, void ChannelInit::OnCreatedChannel(base::WeakPtr<ChannelInit> self,
scoped_refptr<base::TaskRunner> io_thread, scoped_refptr<base::TaskRunner> io_thread,
embedder::ChannelInfo* channel) { ChannelInfo* channel) {
// If |self| was already destroyed, shut the channel down. // If |self| was already destroyed, shut the channel down.
if (!self) { if (!self) {
DestroyChannel(channel); DestroyChannel(channel);
......
...@@ -45,12 +45,12 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelInit { ...@@ -45,12 +45,12 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelInit {
// since we want to destroy the channel even if we're destroyed.) // since we want to destroy the channel even if we're destroyed.)
static void OnCreatedChannel(base::WeakPtr<ChannelInit> self, static void OnCreatedChannel(base::WeakPtr<ChannelInit> self,
scoped_refptr<base::TaskRunner> io_thread, scoped_refptr<base::TaskRunner> io_thread,
embedder::ChannelInfo* channel); ChannelInfo* channel);
scoped_refptr<base::TaskRunner> io_thread_task_runner_; scoped_refptr<base::TaskRunner> io_thread_task_runner_;
// If non-null the channel has been established. // If non-null the channel has been established.
embedder::ChannelInfo* channel_info_; ChannelInfo* channel_info_;
base::WeakPtrFactory<ChannelInit> weak_factory_; base::WeakPtrFactory<ChannelInit> weak_factory_;
......
...@@ -456,7 +456,7 @@ TEST_F(EmbedderTest, MultiprocessChannels) { ...@@ -456,7 +456,7 @@ TEST_F(EmbedderTest, MultiprocessChannels) {
} }
MOJO_MULTIPROCESS_TEST_CHILD_TEST(MultiprocessChannelsClient) { MOJO_MULTIPROCESS_TEST_CHILD_TEST(MultiprocessChannelsClient) {
embedder::ScopedPlatformHandle client_platform_handle = ScopedPlatformHandle client_platform_handle =
mojo::test::MultiprocessTestHelper::client_platform_handle.Pass(); mojo::test::MultiprocessTestHelper::client_platform_handle.Pass();
EXPECT_TRUE(client_platform_handle.is_valid()); EXPECT_TRUE(client_platform_handle.is_valid());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment