| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chrome_mini_installer.h" | 5 #include "chrome/test/mini_installer_test/chrome_mini_installer.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process.h" | 10 #include "base/process.h" |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 477 } |
| 478 | 478 |
| 479 // This method returns path to either program files | 479 // This method returns path to either program files |
| 480 // or documents and setting based on the install type. | 480 // or documents and setting based on the install type. |
| 481 std::wstring ChromeMiniInstaller::GetChromeInstallDirectoryLocation() { | 481 std::wstring ChromeMiniInstaller::GetChromeInstallDirectoryLocation() { |
| 482 FilePath path; | 482 FilePath path; |
| 483 if (install_type_ == mini_installer_constants::kSystemInstall) | 483 if (install_type_ == mini_installer_constants::kSystemInstall) |
| 484 PathService::Get(base::DIR_PROGRAM_FILES, &path); | 484 PathService::Get(base::DIR_PROGRAM_FILES, &path); |
| 485 else | 485 else |
| 486 PathService::Get(base::DIR_LOCAL_APP_DATA, &path); | 486 PathService::Get(base::DIR_LOCAL_APP_DATA, &path); |
| 487 return path.ToWStringHack(); | 487 return path.value(); |
| 488 } | 488 } |
| 489 | 489 |
| 490 FilePath ChromeMiniInstaller::GetStartMenuShortcutPath() { | 490 FilePath ChromeMiniInstaller::GetStartMenuShortcutPath() { |
| 491 FilePath path_name; | 491 FilePath path_name; |
| 492 if (install_type_ == mini_installer_constants::kSystemInstall) | 492 if (install_type_ == mini_installer_constants::kSystemInstall) |
| 493 PathService::Get(base::DIR_COMMON_START_MENU, &path_name); | 493 PathService::Get(base::DIR_COMMON_START_MENU, &path_name); |
| 494 else | 494 else |
| 495 PathService::Get(base::DIR_START_MENU, &path_name); | 495 PathService::Get(base::DIR_START_MENU, &path_name); |
| 496 return path_name; | 496 return path_name; |
| 497 } | 497 } |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // This method will verify if the installed build is correct. | 680 // This method will verify if the installed build is correct. |
| 681 bool ChromeMiniInstaller::VerifyStandaloneInstall() { | 681 bool ChromeMiniInstaller::VerifyStandaloneInstall() { |
| 682 std::wstring reg_key_value_returned, standalone_installer_version; | 682 std::wstring reg_key_value_returned, standalone_installer_version; |
| 683 MiniInstallerTestUtil::GetStandaloneVersion(&standalone_installer_version); | 683 MiniInstallerTestUtil::GetStandaloneVersion(&standalone_installer_version); |
| 684 GetChromeVersionFromRegistry(®_key_value_returned); | 684 GetChromeVersionFromRegistry(®_key_value_returned); |
| 685 if (standalone_installer_version.compare(reg_key_value_returned) == 0) | 685 if (standalone_installer_version.compare(reg_key_value_returned) == 0) |
| 686 return true; | 686 return true; |
| 687 else | 687 else |
| 688 return false; | 688 return false; |
| 689 } | 689 } |
| OLD | NEW |