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

Side by Side Diff: chrome/browser/chromeos/system/touchpad_settings.cc

Issue 8813001: Wait for tpcontrol to exit so we don't leave zombie processes hanging around. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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 | « no previous file | no next file » | 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) 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 #include "chrome/browser/chromeos/system/touchpad_settings.h" 5 #include "chrome/browser/chromeos/system/touchpad_settings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 13 matching lines...) Expand all
24 24
25 bool TPCtrlExists() { 25 bool TPCtrlExists() {
26 return file_util::PathExists(FilePath(kTpControl)); 26 return file_util::PathExists(FilePath(kTpControl));
27 } 27 }
28 28
29 // Launches the tpcontrol command asynchronously, if it exists. 29 // Launches the tpcontrol command asynchronously, if it exists.
30 void LaunchTpControl(const std::vector<std::string>& argv) { 30 void LaunchTpControl(const std::vector<std::string>& argv) {
31 if (!TPCtrlExists()) 31 if (!TPCtrlExists())
32 return; 32 return;
33 33
34 base::LaunchProcess(CommandLine(argv), base::LaunchOptions(), NULL); 34 base::LaunchOptions options;
35 options.wait = true;
36 base::LaunchProcess(CommandLine(argv), options, NULL);
35 } 37 }
36 38
37 } // namespace 39 } // namespace
38 40
39 bool TouchpadExists() { 41 bool TouchpadExists() {
40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
41 static bool init = false; 43 static bool init = false;
42 static bool exists = false; 44 static bool exists = false;
43 45
44 if (init) 46 if (init)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 argv.push_back(kTpControl); 89 argv.push_back(kTpControl);
88 argv.push_back("taptoclick"); 90 argv.push_back("taptoclick");
89 argv.push_back(enabled ? "on" : "off"); 91 argv.push_back(enabled ? "on" : "off");
90 92
91 LaunchTpControl(argv); 93 LaunchTpControl(argv);
92 } 94 }
93 95
94 } // namespace touchpad_settings 96 } // namespace touchpad_settings
95 } // namespace system 97 } // namespace system
96 } // namespace chromeos 98 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698