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

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

Issue 290173011: Cleanup: Use base::CommandLine in remoting/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | remoting/host/desktop_process_main.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/host/daemon_process.h" 5 #include "remoting/host/daemon_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 const tracked_objects::Location& location) { 252 const tracked_objects::Location& location) {
253 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 253 DCHECK(caller_task_runner()->BelongsToCurrentThread());
254 254
255 DoCrashNetworkProcess(location); 255 DoCrashNetworkProcess(location);
256 DeleteAllDesktopSessions(); 256 DeleteAllDesktopSessions();
257 } 257 }
258 258
259 void DaemonProcess::Initialize() { 259 void DaemonProcess::Initialize() {
260 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 260 DCHECK(caller_task_runner()->BelongsToCurrentThread());
261 261
262 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 262 const base::CommandLine* command_line =
263 base::CommandLine::ForCurrentProcess();
263 // Get the name of the host configuration file. 264 // Get the name of the host configuration file.
264 base::FilePath default_config_dir = remoting::GetConfigDir(); 265 base::FilePath default_config_dir = remoting::GetConfigDir();
265 base::FilePath config_path = default_config_dir.Append( 266 base::FilePath config_path = default_config_dir.Append(
266 kDefaultHostConfigFile); 267 kDefaultHostConfigFile);
267 if (command_line->HasSwitch(kHostConfigSwitchName)) { 268 if (command_line->HasSwitch(kHostConfigSwitchName)) {
268 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName); 269 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName);
269 } 270 }
270 config_watcher_.reset(new ConfigFileWatcher( 271 config_watcher_.reset(new ConfigFileWatcher(
271 caller_task_runner(), io_task_runner(), config_path)); 272 caller_task_runner(), io_task_runner(), config_path));
272 config_watcher_->Watch(this); 273 config_watcher_->Watch(this);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 371 }
371 372
372 void DaemonProcess::DeleteAllDesktopSessions() { 373 void DaemonProcess::DeleteAllDesktopSessions() {
373 while (!desktop_sessions_.empty()) { 374 while (!desktop_sessions_.empty()) {
374 delete desktop_sessions_.front(); 375 delete desktop_sessions_.front();
375 desktop_sessions_.pop_front(); 376 desktop_sessions_.pop_front();
376 } 377 }
377 } 378 }
378 379
379 } // namespace remoting 380 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698