OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/test/mini_installer_test/mini_installer_test_util.h" | 5 #include "chrome/test/mini_installer_test/mini_installer_test_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/platform_thread.h" | 9 #include "base/platform_thread.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "base/string_util.h" | |
12 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/installer/util/logging_installer.h" | 13 #include "chrome/installer/util/logging_installer.h" |
14 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" | 14 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 // Change current directory so that chrome.dll from current folder | 17 // Change current directory so that chrome.dll from current folder |
18 // will not be used as fall back. | 18 // will not be used as fall back. |
19 bool MiniInstallerTestUtil::ChangeCurrentDirectory(std::wstring *current_path) { | 19 bool MiniInstallerTestUtil::ChangeCurrentDirectory(std::wstring *current_path) { |
20 wchar_t backup_path[MAX_PATH]; | 20 wchar_t backup_path[MAX_PATH]; |
21 DWORD ret = ::GetCurrentDirectory(MAX_PATH, backup_path); | 21 DWORD ret = ::GetCurrentDirectory(MAX_PATH, backup_path); |
22 if (ret == 0 && ret > MAX_PATH) | 22 if (ret == 0 && ret > MAX_PATH) |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 (timer < 60000)) { | 296 (timer < 60000)) { |
297 PlatformThread::Sleep(200); | 297 PlatformThread::Sleep(200); |
298 timer = timer + 200; | 298 timer = timer + 200; |
299 } | 299 } |
300 } else { | 300 } else { |
301 if (base::GetProcessCount(process_name, NULL) != 0) | 301 if (base::GetProcessCount(process_name, NULL) != 0) |
302 return false; | 302 return false; |
303 } | 303 } |
304 return true; | 304 return true; |
305 } | 305 } |
OLD | NEW |