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

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

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: And again, this time with working tests... Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 config_path, file_io_thread.message_loop_proxy())); 112 config_path, file_io_thread.message_loop_proxy()));
113 113
114 if (!config->Read()) { 114 if (!config->Read()) {
115 LOG(ERROR) << "Failed to read configuration file " << config_path.value(); 115 LOG(ERROR) << "Failed to read configuration file " << config_path.value();
116 context.Stop(); 116 context.Stop();
117 return 1; 117 return 1;
118 } 118 }
119 119
120 FilePath module_path; 120 FilePath module_path;
121 PathService::Get(base::DIR_MODULE, &module_path); 121 PathService::Get(base::DIR_MODULE, &module_path);
122 CHECK(media::InitializeMediaLibrary(module_path)) 122 media::InitializeMediaLibrary(module_path);
123 CHECK(media::IsMediaLibraryInitialized())
123 << "Cannot load media library"; 124 << "Cannot load media library";
124 125
125 // Construct a chromoting host. 126 // Construct a chromoting host.
126 scoped_refptr<ChromotingHost> host; 127 scoped_refptr<ChromotingHost> host;
127 128
128 bool fake = cmd_line->HasSwitch(kFakeSwitchName); 129 bool fake = cmd_line->HasSwitch(kFakeSwitchName);
129 if (fake) { 130 if (fake) {
130 remoting::Capturer* capturer = 131 remoting::Capturer* capturer =
131 new remoting::CapturerFake(context.main_message_loop()); 132 new remoting::CapturerFake(context.main_message_loop());
132 remoting::protocol::InputStub* input_stub = 133 remoting::protocol::InputStub* input_stub =
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 167
167 // Let the chromoting host run until the shutdown task is executed. 168 // Let the chromoting host run until the shutdown task is executed.
168 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop)); 169 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop));
169 message_loop.MessageLoop::Run(); 170 message_loop.MessageLoop::Run();
170 171
171 // And then stop the chromoting context. 172 // And then stop the chromoting context.
172 context.Stop(); 173 context.Stop();
173 file_io_thread.Stop(); 174 file_io_thread.Stop();
174 return 0; 175 return 0;
175 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698