OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/input_device_settings.h" | 5 #include "chrome/browser/chromeos/system/input_device_settings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Script must exist on device and is of correct format. | 51 // Script must exist on device and is of correct format. |
52 DCHECK(script.compare(kInputControl) == 0); | 52 DCHECK(script.compare(kInputControl) == 0); |
53 DCHECK(!base::SysInfo::IsRunningOnChromeOS() || ScriptExists(script)); | 53 DCHECK(!base::SysInfo::IsRunningOnChromeOS() || ScriptExists(script)); |
54 | 54 |
55 if (!ScriptExists(script)) | 55 if (!ScriptExists(script)) |
56 return; | 56 return; |
57 | 57 |
58 base::Process process = | 58 base::Process process = |
59 base::LaunchProcess(base::CommandLine(argv), base::LaunchOptions()); | 59 base::LaunchProcess(base::CommandLine(argv), base::LaunchOptions()); |
60 if (process.IsValid()) | 60 if (process.IsValid()) |
61 base::EnsureProcessGetsReaped(process.pid()); | 61 base::EnsureProcessGetsReaped(process.Pid()); |
62 } | 62 } |
63 | 63 |
64 void ExecuteScript(const std::vector<std::string>& argv) { | 64 void ExecuteScript(const std::vector<std::string>& argv) { |
65 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 65 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
66 | 66 |
67 if (argv.size() == 1) | 67 if (argv.size() == 1) |
68 return; | 68 return; |
69 | 69 |
70 VLOG(1) << "About to launch: \"" | 70 VLOG(1) << "About to launch: \"" |
71 << base::CommandLine(argv).GetCommandLineString() << "\""; | 71 << base::CommandLine(argv).GetCommandLineString() << "\""; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 void InputDeviceSettings::SetSettingsForTesting( | 315 void InputDeviceSettings::SetSettingsForTesting( |
316 InputDeviceSettings* test_settings) { | 316 InputDeviceSettings* test_settings) { |
317 if (g_test_instance == test_settings) | 317 if (g_test_instance == test_settings) |
318 return; | 318 return; |
319 delete g_test_instance; | 319 delete g_test_instance; |
320 g_test_instance = test_settings; | 320 g_test_instance = test_settings; |
321 } | 321 } |
322 | 322 |
323 } // namespace system | 323 } // namespace system |
324 } // namespace chromeos | 324 } // namespace chromeos |
OLD | NEW |