Index: chrome/installer/util/installer_state_unittest.cc |
diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc |
index d618c85bd9fd13b34d4477b202267b2febae791c..3818712f2f44497c9fd7929b9ab375cdcfe653ec 100644 |
--- a/chrome/installer/util/installer_state_unittest.cc |
+++ b/chrome/installer/util/installer_state_unittest.cc |
@@ -55,7 +55,7 @@ class MockInstallerState : public InstallerState { |
static bool IsFileInUse(const base::FilePath& file) { |
return InstallerState::IsFileInUse(file); |
} |
- const base::Version& critical_update_version() const { |
+ const Version& critical_update_version() const { |
return critical_update_version_; |
} |
void GetExistingExeVersions(std::set<std::string>* existing_version_strings) { |
@@ -140,7 +140,7 @@ TEST_F(InstallerStateTest, Delete) { |
MockInstallerState installer_state; |
BuildSingleChromeState(chrome_dir, &installer_state); |
- base::Version latest_version("1.0.4.0"); |
+ Version latest_version("1.0.4.0"); |
{ |
base::ScopedTempDir temp_dir; |
ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
@@ -220,8 +220,8 @@ TEST_F(InstallerStateTest, DeleteInUsed) { |
MockInstallerState installer_state; |
BuildSingleChromeState(chrome_dir, &installer_state); |
- base::Version latest_version("1.0.4.0"); |
- base::Version existing_version("1.0.1.0"); |
+ Version latest_version("1.0.4.0"); |
+ Version existing_version("1.0.1.0"); |
{ |
base::ScopedTempDir temp_dir; |
ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
@@ -264,8 +264,8 @@ TEST_F(InstallerStateTest, Basic) { |
const char kOldVersion[] = "1.2.3.4"; |
const char kNewVersion[] = "2.3.4.5"; |
- base::Version new_version(kNewVersion); |
- base::Version old_version(kOldVersion); |
+ Version new_version(kNewVersion); |
+ Version old_version(kOldVersion); |
ASSERT_TRUE(new_version.IsValid()); |
ASSERT_TRUE(old_version.IsValid()); |
@@ -345,7 +345,7 @@ TEST_F(InstallerStateTest, WithProduct) { |
EXPECT_EQ(system_level, installer_state.system_install()); |
const char kCurrentVersion[] = "1.2.3.4"; |
- base::Version current_version(kCurrentVersion); |
+ Version current_version(kCurrentVersion); |
HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
EXPECT_EQ(root, installer_state.root_key()); |
@@ -363,8 +363,7 @@ TEST_F(InstallerStateTest, WithProduct) { |
current_version.GetString()).c_str()); |
machine_state.Initialize(); |
// TODO(tommi): Also test for when there exists a new_chrome.exe. |
- base::Version found_version( |
- *installer_state.GetCurrentVersion(machine_state)); |
+ Version found_version(*installer_state.GetCurrentVersion(machine_state)); |
EXPECT_TRUE(found_version.IsValid()); |
if (found_version.IsValid()) |
EXPECT_TRUE(current_version.Equals(found_version)); |
@@ -455,7 +454,7 @@ TEST_F(InstallerStateTest, GetCurrentVersionMigrateChrome) { |
// Pretend that this version of single-install Chrome is already installed. |
machine_state.AddChrome(system_install, false, |
- new base::Version(chrome::kChromeVersion)); |
+ new Version(chrome::kChromeVersion)); |
// Now we're invoked to install multi Chrome. |
CommandLine cmd_line( |
@@ -465,8 +464,7 @@ TEST_F(InstallerStateTest, GetCurrentVersionMigrateChrome) { |
installer_state.Initialize(cmd_line, prefs, machine_state); |
// Is the Chrome version picked up? |
- scoped_ptr<base::Version> version( |
- installer_state.GetCurrentVersion(machine_state)); |
+ scoped_ptr<Version> version(installer_state.GetCurrentVersion(machine_state)); |
EXPECT_TRUE(version.get() != NULL); |
} |
@@ -508,11 +506,11 @@ TEST_F(InstallerStateTest, RemoveOldVersionDirs) { |
const char kChromeExeVersion[] = "2.1.1.1"; |
const char kNewChromeExeVersion[] = "3.0.0.0"; |
- base::Version new_version(kNewVersion); |
- base::Version old_version(kOldVersion); |
- base::Version old_chrome_exe_version(kOldChromeExeVersion); |
- base::Version chrome_exe_version(kChromeExeVersion); |
- base::Version new_chrome_exe_version(kNewChromeExeVersion); |
+ Version new_version(kNewVersion); |
+ Version old_version(kOldVersion); |
+ Version old_chrome_exe_version(kOldChromeExeVersion); |
+ Version chrome_exe_version(kChromeExeVersion); |
+ Version new_chrome_exe_version(kNewChromeExeVersion); |
ASSERT_TRUE(new_version.IsValid()); |
ASSERT_TRUE(old_version.IsValid()); |
@@ -547,7 +545,7 @@ TEST_F(InstallerStateTest, RemoveOldVersionDirs) { |
struct target_info { |
base::FilePath target_file; |
- const base::Version& target_version; |
+ const Version& target_version; |
} targets[] = { |
{ installer_state.target_path().Append(installer::kChromeOldExe), |
old_chrome_exe_version }, |
@@ -591,7 +589,7 @@ TEST_F(InstallerStateTest, RemoveOldVersionDirs) { |
for (base::FilePath next_version = version_enum.Next(); !next_version.empty(); |
next_version = version_enum.Next()) { |
base::FilePath dir_name(next_version.BaseName()); |
- base::Version version(WideToASCII(dir_name.value())); |
+ Version version(WideToASCII(dir_name.value())); |
if (version.IsValid()) { |
EXPECT_TRUE(expected_remaining_dirs.erase(version.GetString())) |
<< "Unexpected version dir found: " << version.GetString(); |
@@ -666,11 +664,11 @@ class InstallerStateCriticalVersionTest : public ::testing::Test { |
// Creates a set of versions for use by all test runs. |
static void SetUpTestCase() { |
- low_version_ = new base::Version("15.0.874.106"); |
- opv_version_ = new base::Version("15.0.874.255"); |
- middle_version_ = new base::Version("16.0.912.32"); |
- pv_version_ = new base::Version("16.0.912.255"); |
- high_version_ = new base::Version("17.0.932.0"); |
+ low_version_ = new Version("15.0.874.106"); |
+ opv_version_ = new Version("15.0.874.255"); |
+ middle_version_ = new Version("16.0.912.32"); |
+ pv_version_ = new Version("16.0.912.255"); |
+ high_version_ = new Version("17.0.932.0"); |
} |
// Cleans up versions used by all test runs. |
@@ -685,7 +683,7 @@ class InstallerStateCriticalVersionTest : public ::testing::Test { |
// Initializes the InstallerState to use for a test run. The returned |
// instance's critical update version is set to |version|. |version| may be |
// NULL, in which case the critical update version is unset. |
- MockInstallerState& Initialize(const base::Version* version) { |
+ MockInstallerState& Initialize(const Version* version) { |
cmd_line_ = version == NULL ? |
CommandLine::FromString(L"setup.exe") : |
CommandLine::FromString( |
@@ -697,11 +695,11 @@ class InstallerStateCriticalVersionTest : public ::testing::Test { |
return installer_state_; |
} |
- static base::Version* low_version_; |
- static base::Version* opv_version_; |
- static base::Version* middle_version_; |
- static base::Version* pv_version_; |
- static base::Version* high_version_; |
+ static Version* low_version_; |
+ static Version* opv_version_; |
+ static Version* middle_version_; |
+ static Version* pv_version_; |
+ static Version* high_version_; |
CommandLine cmd_line_; |
scoped_ptr<MasterPreferences> prefs_; |
@@ -709,11 +707,11 @@ class InstallerStateCriticalVersionTest : public ::testing::Test { |
MockInstallerState installer_state_; |
}; |
-base::Version* InstallerStateCriticalVersionTest::low_version_ = NULL; |
-base::Version* InstallerStateCriticalVersionTest::opv_version_ = NULL; |
-base::Version* InstallerStateCriticalVersionTest::middle_version_ = NULL; |
-base::Version* InstallerStateCriticalVersionTest::pv_version_ = NULL; |
-base::Version* InstallerStateCriticalVersionTest::high_version_ = NULL; |
+Version* InstallerStateCriticalVersionTest::low_version_ = NULL; |
+Version* InstallerStateCriticalVersionTest::opv_version_ = NULL; |
+Version* InstallerStateCriticalVersionTest::middle_version_ = NULL; |
+Version* InstallerStateCriticalVersionTest::pv_version_ = NULL; |
+Version* InstallerStateCriticalVersionTest::high_version_ = NULL; |
// Test the case where the critical version is less than the currently-running |
// Chrome. The critical version is ignored since it doesn't apply. |