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

Side by Side Diff: remoting/host/simple_host_process.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This is an application of a minimal host process in a Chromoting 5 // This is an application of a minimal host process in a Chromoting
6 // system. It serves the purpose of gluing different pieces together 6 // system. It serves the purpose of gluing different pieces together
7 // to make a functional host process for testing. 7 // to make a functional host process for testing.
8 // 8 //
9 // It peforms the following functionality: 9 // It peforms the following functionality:
10 // 1. Connect to the GTalk network and register the machine as a host. 10 // 1. Connect to the GTalk network and register the machine as a host.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (!config->Read()) { 126 if (!config->Read()) {
127 LOG(ERROR) << "Failed to read configuration file " << config_path.value(); 127 LOG(ERROR) << "Failed to read configuration file " << config_path.value();
128 return 1; 128 return 1;
129 } 129 }
130 130
131 // Allocate a chromoting context and starts it. 131 // Allocate a chromoting context and starts it.
132 remoting::ChromotingHostContext context; 132 remoting::ChromotingHostContext context;
133 context.Start(); 133 context.Start();
134 134
135 // Construct a chromoting host. 135 // Construct a chromoting host.
136 scoped_refptr<remoting::ChromotingHost> host = 136 scoped_refptr<remoting::ChromotingHost> host(
137 new remoting::ChromotingHost(&context, 137 new remoting::ChromotingHost(&context,
138 config, 138 config,
139 capturer.release(), 139 capturer.release(),
140 encoder.release(), 140 encoder.release(),
141 event_handler.release()); 141 event_handler.release()));
142 142
143 // Let the chromoting host run until the shutdown task is executed. 143 // Let the chromoting host run until the shutdown task is executed.
144 MessageLoop message_loop(MessageLoop::TYPE_UI); 144 MessageLoop message_loop(MessageLoop::TYPE_UI);
145 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop)); 145 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop));
146 message_loop.Run(); 146 message_loop.Run();
147 147
148 // And then stop the chromoting context. 148 // And then stop the chromoting context.
149 context.Stop(); 149 context.Stop();
150 file_io_thread.Stop(); 150 file_io_thread.Stop();
151 return 0; 151 return 0;
152 } 152 }
OLDNEW
« no previous file with comments | « remoting/host/json_host_config_unittest.cc ('k') | remoting/jingle_glue/channel_socket_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698