summaryrefslogtreecommitdiffstats
path: root/chrome/test/mini_installer_test
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 19:59:05 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 19:59:05 +0000
commit0302e4ac5907fcdaafbf2a883b29496032c0db19 (patch)
tree1dc0581bfb318593416b8d872a0f5f528eabf8e4 /chrome/test/mini_installer_test
parentde17ab159c33d8a89dcccae69c167c5d4a6cda68 (diff)
downloadchromium_src-0302e4ac5907fcdaafbf2a883b29496032c0db19.zip
chromium_src-0302e4ac5907fcdaafbf2a883b29496032c0db19.tar.gz
chromium_src-0302e4ac5907fcdaafbf2a883b29496032c0db19.tar.bz2
Remove uses of deprecated version of PathService::Get() in the installer.
Review URL: http://codereview.chromium.org/109033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/mini_installer_test')
-rw-r--r--chrome/test/mini_installer_test/chrome_mini_installer.cc20
-rw-r--r--chrome/test/mini_installer_test/chrome_mini_installer.h8
2 files changed, 14 insertions, 14 deletions
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc
index 0da0b76..c4601bc 100644
--- a/chrome/test/mini_installer_test/chrome_mini_installer.cc
+++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/file_util.h"
#include "base/path_service.h"
#include "base/platform_thread.h"
#include "base/process_util.h"
@@ -368,12 +369,12 @@ void ChromeMiniInstaller::FindChromeShortcut() {
// This method returns path to either program files
// or documents and setting based on the install type.
std::wstring ChromeMiniInstaller::GetChromeInstallDirectoryLocation() {
- std::wstring path;
+ FilePath path;
if (install_type_ == mini_installer_constants::kSystemInstall)
PathService::Get(base::DIR_PROGRAM_FILES, &path);
else
PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
- return path;
+ return path.ToWStringHack();
}
// This method will create a command line to run apply tag.
@@ -403,21 +404,21 @@ bool ChromeMiniInstaller::GetCommandForTagging(std::wstring *return_command) {
// Get path for mini_installer.exe.
std::wstring ChromeMiniInstaller::GetInstallerExePath(const wchar_t* name) {
- std::wstring installer_path;
+ FilePath installer_path;
PathService::Get(base::DIR_EXE, &installer_path);
- file_util::AppendToPath(&installer_path, name);
- printf("Chrome exe path is %ls\n", installer_path.c_str());
- return installer_path;
+ installer_path.Append(name);
+ printf("Chrome exe path is %ls\n", installer_path.value().c_str());
+ return installer_path.ToWStringHack();
}
// This method gets the shortcut path from startmenu based on install type
std::wstring ChromeMiniInstaller::GetStartMenuShortcutPath() {
- std::wstring path_name;
+ FilePath path_name;
if (install_type_ == mini_installer_constants::kSystemInstall)
PathService::Get(base::DIR_COMMON_START_MENU, &path_name);
else
PathService::Get(base::DIR_START_MENU, &path_name);
- return path_name;
+ return path_name.ToWStringHack();
}
// This is a predicate to sort file_info.
@@ -683,8 +684,7 @@ void ChromeMiniInstaller::WaitUntilProcessStopsRunning(
PlatformThread::Sleep(200);
timer = timer + 200;
}
- }
- else {
+ } else {
ASSERT_EQ(0, base::GetProcessCount(process_name, NULL));
}
}
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.h b/chrome/test/mini_installer_test/chrome_mini_installer.h
index f8578bd..df93b52 100644
--- a/chrome/test/mini_installer_test/chrome_mini_installer.h
+++ b/chrome/test/mini_installer_test/chrome_mini_installer.h
@@ -14,7 +14,7 @@
#include <string>
#include <vector>
-#include "base/file_util.h"
+#include "base/basictypes.h"
// This structure holds the name and creation time
// details of all the chrome nightly builds.
@@ -37,7 +37,7 @@ typedef std::vector<file_info> file_info_list;
// This class has methods to install and uninstall Chrome mini installer.
class ChromeMiniInstaller {
public:
- ChromeMiniInstaller(std::wstring type) {
+ explicit ChromeMiniInstaller(std::wstring type) {
install_type_ = type;
}
@@ -82,7 +82,7 @@ class ChromeMiniInstaller {
// Closes First Run UI dialog.
void CloseFirstRunUIDialog(bool over_install);
- // Close Window whose name is 'window_name', by sending Windows message
+ // Close Window whose name is 'window_name', by sending Windows message
// 'message' to it.
bool CloseWindow(const wchar_t* window_name, UINT message);
@@ -175,7 +175,7 @@ class ChromeMiniInstaller {
// Waits until the given process stops running
void WaitUntilProcessStopsRunning(const wchar_t* process_name);
- DISALLOW_EVIL_CONSTRUCTORS(ChromeMiniInstaller);
+ DISALLOW_COPY_AND_ASSIGN(ChromeMiniInstaller);
};
#endif // CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H__