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

Side by Side Diff: remoting/base/auto_thread.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | remoting/base/buffered_socket_writer.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/base/auto_thread.h" 5 #include "remoting/base/auto_thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
(...skipping 13 matching lines...) Expand all
24 #if defined(OS_WIN) 24 #if defined(OS_WIN)
25 scoped_ptr<base::win::ScopedCOMInitializer> CreateComInitializer( 25 scoped_ptr<base::win::ScopedCOMInitializer> CreateComInitializer(
26 AutoThread::ComInitType type) { 26 AutoThread::ComInitType type) {
27 scoped_ptr<base::win::ScopedCOMInitializer> initializer; 27 scoped_ptr<base::win::ScopedCOMInitializer> initializer;
28 if (type == AutoThread::COM_INIT_MTA) { 28 if (type == AutoThread::COM_INIT_MTA) {
29 initializer.reset(new base::win::ScopedCOMInitializer( 29 initializer.reset(new base::win::ScopedCOMInitializer(
30 base::win::ScopedCOMInitializer::kMTA)); 30 base::win::ScopedCOMInitializer::kMTA));
31 } else if (type == AutoThread::COM_INIT_STA) { 31 } else if (type == AutoThread::COM_INIT_STA) {
32 initializer.reset(new base::win::ScopedCOMInitializer()); 32 initializer.reset(new base::win::ScopedCOMInitializer());
33 } 33 }
34 return initializer.Pass(); 34 return initializer;
35 } 35 }
36 #endif 36 #endif
37 37
38 } 38 }
39 39
40 // Used to pass data to ThreadMain. This structure is allocated on the stack 40 // Used to pass data to ThreadMain. This structure is allocated on the stack
41 // from within StartWithType. 41 // from within StartWithType.
42 struct AutoThread::StartupData { 42 struct AutoThread::StartupData {
43 // Fields describing the desired thread behaviour. 43 // Fields describing the desired thread behaviour.
44 base::MessageLoop::Type loop_type; 44 base::MessageLoop::Type loop_type;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 CreateComInitializer(com_init_type_)); 206 CreateComInitializer(com_init_type_));
207 #endif 207 #endif
208 208
209 message_loop.Run(); 209 message_loop.Run();
210 210
211 // Assert that MessageLoop::QuitWhenIdle was called by AutoThread::QuitThread. 211 // Assert that MessageLoop::QuitWhenIdle was called by AutoThread::QuitThread.
212 DCHECK(was_quit_properly_); 212 DCHECK(was_quit_properly_);
213 } 213 }
214 214
215 } // namespace base 215 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | remoting/base/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698