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

Side by Side Diff: mojo/edk/embedder/embedder.cc

Issue 724493002: Re-run clang-format on mojo/edk/{embedder,system,test}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/edk/embedder/embedder.h" 5 #include "mojo/edk/embedder/embedder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 DCHECK(internal::g_core); 120 DCHECK(internal::g_core);
121 ScopedMessagePipeHandle rv( 121 ScopedMessagePipeHandle rv(
122 MessagePipeHandle(internal::g_core->AddDispatcher(dispatcher))); 122 MessagePipeHandle(internal::g_core->AddDispatcher(dispatcher)));
123 123
124 scoped_ptr<ChannelInfo> channel_info(new ChannelInfo()); 124 scoped_ptr<ChannelInfo> channel_info(new ChannelInfo());
125 // We'll have to set |channel_info->channel| on the I/O thread. 125 // We'll have to set |channel_info->channel| on the I/O thread.
126 channel_info->channel_thread_task_runner = io_thread_task_runner; 126 channel_info->channel_thread_task_runner = io_thread_task_runner;
127 127
128 if (rv.is_valid()) { 128 if (rv.is_valid()) {
129 io_thread_task_runner->PostTask(FROM_HERE, 129 io_thread_task_runner->PostTask(
130 base::Bind(&CreateChannelHelper, 130 FROM_HERE,
131 base::Passed(&platform_handle), 131 base::Bind(&CreateChannelHelper, base::Passed(&platform_handle),
132 base::Passed(&channel_info), 132 base::Passed(&channel_info), channel_endpoint, callback,
133 channel_endpoint, 133 callback_thread_task_runner));
134 callback,
135 callback_thread_task_runner));
136 } else { 134 } else {
137 (callback_thread_task_runner.get() ? callback_thread_task_runner 135 (callback_thread_task_runner.get() ? callback_thread_task_runner
138 : io_thread_task_runner) 136 : io_thread_task_runner)
139 ->PostTask(FROM_HERE, base::Bind(callback, channel_info.release())); 137 ->PostTask(FROM_HERE, base::Bind(callback, channel_info.release()));
140 } 138 }
141 139
142 return rv.Pass(); 140 return rv.Pass();
143 } 141 }
144 142
145 void DestroyChannelOnIOThread(ChannelInfo* channel_info) { 143 void DestroyChannelOnIOThread(ChannelInfo* channel_info) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 206
209 *platform_handle = 207 *platform_handle =
210 static_cast<system::PlatformHandleDispatcher*>(dispatcher.get()) 208 static_cast<system::PlatformHandleDispatcher*>(dispatcher.get())
211 ->PassPlatformHandle() 209 ->PassPlatformHandle()
212 .Pass(); 210 .Pass();
213 return MOJO_RESULT_OK; 211 return MOJO_RESULT_OK;
214 } 212 }
215 213
216 } // namespace embedder 214 } // namespace embedder
217 } // namespace mojo 215 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698