OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/app/chrome_watcher_client_win.h" | 5 #include "chrome/app/chrome_watcher_client_win.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" |
9 #include "components/browser_watcher/watcher_client_win.h" | 10 #include "components/browser_watcher/watcher_client_win.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 // Because we can only bind parameters from the left, |parent_process| must be | 14 // Because we can only bind parameters from the left, |parent_process| must be |
14 // the last parameter of the method that we bind into a | 15 // the last parameter of the method that we bind into a |
15 // BrowserWatcherClient::CommandLineGenerator. The ChromeWatcherClient API is | 16 // BrowserWatcherClient::CommandLineGenerator. The ChromeWatcherClient API is |
16 // more intuitive if the ChromeWatcherClient::CommandLineGenerator takes | 17 // more intuitive if the ChromeWatcherClient::CommandLineGenerator takes |
17 // |parent_process| as its second parameter, so we use this intermediate | 18 // |parent_process| as its second parameter, so we use this intermediate |
18 // function to swap the order. | 19 // function to swap the order. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 bool ChromeWatcherClient::WaitForExit(int* exit_code) { | 97 bool ChromeWatcherClient::WaitForExit(int* exit_code) { |
97 return process_.IsValid() && process_.WaitForExit(exit_code); | 98 return process_.IsValid() && process_.WaitForExit(exit_code); |
98 } | 99 } |
99 | 100 |
100 bool ChromeWatcherClient::WaitForExitWithTimeout(base::TimeDelta timeout, | 101 bool ChromeWatcherClient::WaitForExitWithTimeout(base::TimeDelta timeout, |
101 int* exit_code) { | 102 int* exit_code) { |
102 return process_.IsValid() && | 103 return process_.IsValid() && |
103 process_.WaitForExitWithTimeout(timeout, exit_code); | 104 process_.WaitForExitWithTimeout(timeout, exit_code); |
104 } | 105 } |
OLD | NEW |