diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 16:06:13 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 16:06:13 +0000 |
commit | c5e4a2224ab96a7380e768c6a6148985accd3488 (patch) | |
tree | 993cafd3bd7514df75ff773879d3633ee916e3f8 /chrome_frame | |
parent | 3bc2e375275d2e3a2aa0d8766d8e17f766ddbf78 (diff) | |
download | chromium_src-c5e4a2224ab96a7380e768c6a6148985accd3488.zip chromium_src-c5e4a2224ab96a7380e768c6a6148985accd3488.tar.gz chromium_src-c5e4a2224ab96a7380e768c6a6148985accd3488.tar.bz2 |
Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the header."
This is a speculative revert of r242414.
BUG=330681
TEST=as in bug
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/109673004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/dll_redirector.cc | 12 | ||||
-rw-r--r-- | chrome_frame/test/dll_redirector_loading_test.cc | 16 | ||||
-rw-r--r-- | chrome_frame/test/dll_redirector_test.cc | 42 | ||||
-rw-r--r-- | chrome_frame/test/test_with_web_server.cc | 4 |
4 files changed, 37 insertions, 37 deletions
diff --git a/chrome_frame/dll_redirector.cc b/chrome_frame/dll_redirector.cc index e52362c..b21b368 100644 --- a/chrome_frame/dll_redirector.cc +++ b/chrome_frame/dll_redirector.cc @@ -124,7 +124,7 @@ bool DllRedirector::RegisterAsFirstCFModule() { DCHECK(first_module_handle_ == NULL); // Build our own file version outside of the lock: - scoped_ptr<base::Version> our_version(GetCurrentModuleVersion()); + scoped_ptr<Version> our_version(GetCurrentModuleVersion()); // We sadly can't use the autolock here since we want to have a timeout. // Be careful not to return while holding the lock. Also, attempt to do as @@ -188,7 +188,7 @@ bool DllRedirector::RegisterAsFirstCFModule() { } else { char buffer[kSharedMemorySize] = {0}; memcpy(buffer, shared_memory_->memory(), kSharedMemorySize - 1); - dll_version_.reset(new base::Version(buffer)); + dll_version_.reset(new Version(buffer)); if (!dll_version_->IsValid() || dll_version_->Equals(*our_version.get())) { @@ -239,15 +239,15 @@ LPFNGETCLASSOBJECT DllRedirector::GetDllGetClassObjectPtr() { return proc_ptr; } -base::Version* DllRedirector::GetCurrentModuleVersion() { +Version* DllRedirector::GetCurrentModuleVersion() { scoped_ptr<FileVersionInfo> file_version_info( FileVersionInfo::CreateFileVersionInfoForCurrentModule()); DCHECK(file_version_info.get()); - scoped_ptr<base::Version> current_version; + scoped_ptr<Version> current_version; if (file_version_info.get()) { current_version.reset( - new base::Version(WideToASCII(file_version_info->file_version()))); + new Version(WideToASCII(file_version_info->file_version()))); DCHECK(current_version->IsValid()); } @@ -270,7 +270,7 @@ HMODULE DllRedirector::GetFirstModule() { return first_module_handle_; } -HMODULE DllRedirector::LoadVersionedModule(base::Version* version) { +HMODULE DllRedirector::LoadVersionedModule(Version* version) { DCHECK(version); HMODULE hmodule = NULL; diff --git a/chrome_frame/test/dll_redirector_loading_test.cc b/chrome_frame/test/dll_redirector_loading_test.cc index 3d58eba..efafa7c 100644 --- a/chrome_frame/test/dll_redirector_loading_test.cc +++ b/chrome_frame/test/dll_redirector_loading_test.cc @@ -46,7 +46,7 @@ class DllRedirectorLoadingTest : public testing::Test { FileVersionInfo::CreateFileVersionInfo(build_chrome_frame_dll)); ASSERT_TRUE(original_version_info != NULL); original_version_.reset( - new base::Version(WideToASCII(original_version_info->file_version()))); + new Version(WideToASCII(original_version_info->file_version()))); ASSERT_TRUE(original_version_->IsValid()); // Make a place for us to run the test from. @@ -81,7 +81,7 @@ class DllRedirectorLoadingTest : public testing::Test { FileVersionInfo::CreateFileVersionInfo(temporary_new_chrome_frame_dll)); ASSERT_TRUE(new_version_info != NULL); new_version_.reset( - new base::Version(WideToASCII(new_version_info->file_version()))); + new Version(WideToASCII(new_version_info->file_version()))); ASSERT_TRUE(new_version_->IsValid()); // Make sure the new version is larger than the old. @@ -110,16 +110,16 @@ class DllRedirectorLoadingTest : public testing::Test { protected: static base::FilePath original_chrome_frame_dll_; static base::FilePath new_chrome_frame_dll_; - static scoped_ptr<base::Version> original_version_; - static scoped_ptr<base::Version> new_version_; + static scoped_ptr<Version> original_version_; + static scoped_ptr<Version> new_version_; static base::ScopedTempDir temp_dir_; }; // class DllRedirectorLoadingTest base::FilePath DllRedirectorLoadingTest::original_chrome_frame_dll_; base::FilePath DllRedirectorLoadingTest::new_chrome_frame_dll_; -scoped_ptr<base::Version> DllRedirectorLoadingTest::original_version_; -scoped_ptr<base::Version> DllRedirectorLoadingTest::new_version_; +scoped_ptr<Version> DllRedirectorLoadingTest::original_version_; +scoped_ptr<Version> DllRedirectorLoadingTest::new_version_; base::ScopedTempDir DllRedirectorLoadingTest::temp_dir_; #if defined(COMPONENT_BUILD) @@ -135,7 +135,7 @@ TEST_F(DllRedirectorLoadingTest, MAYBE_TestDllRedirection) { struct TestData { base::FilePath first_dll; base::FilePath second_dll; - base::Version* expected_beacon_version; + Version* expected_beacon_version; } test_data[] = { { original_chrome_frame_dll_, @@ -208,7 +208,7 @@ TEST_F(DllRedirectorLoadingTest, MAYBE_TestDllRedirection) { char buffer[kSharedMemoryBytes] = {0}; memcpy(buffer, beacon.memory(), kSharedMemoryBytes - 1); - base::Version beacon_version(buffer); + Version beacon_version(buffer); ASSERT_TRUE(beacon_version.IsValid()); EXPECT_EQ(0, diff --git a/chrome_frame/test/dll_redirector_test.cc b/chrome_frame/test/dll_redirector_test.cc index 853235a..104eba2 100644 --- a/chrome_frame/test/dll_redirector_test.cc +++ b/chrome_frame/test/dll_redirector_test.cc @@ -36,17 +36,17 @@ class MockDllRedirector : public DllRedirector { return kMockModuleHandle; } - virtual base::Version* GetCurrentModuleVersion() { - return new base::Version(kMockVersionString); + virtual Version* GetCurrentModuleVersion() { + return new Version(kMockVersionString); } virtual HMODULE GetFirstModule() { return DllRedirector::GetFirstModule(); } - base::Version* GetFirstModuleVersion() { + Version* GetFirstModuleVersion() { // Lazy man's copy. - return new base::Version(dll_version_->GetString()); + return new Version(dll_version_->GetString()); } base::SharedMemory* shared_memory() { @@ -63,8 +63,8 @@ class MockDllRedirector2 : public MockDllRedirector { return kMockModuleHandle2; } - virtual base::Version* GetCurrentModuleVersion() { - return new base::Version(kMockVersionString2); + virtual Version* GetCurrentModuleVersion() { + return new Version(kMockVersionString2); } }; @@ -87,8 +87,8 @@ class DllRedirectorTest : public testing::Test { public: virtual void SetUp() { shared_memory_.reset(new base::SharedMemory); - mock_version_.reset(new base::Version(kMockVersionString)); - mock_version2_.reset(new base::Version(kMockVersionString2)); + mock_version_.reset(new Version(kMockVersionString)); + mock_version2_.reset(new Version(kMockVersionString2)); } virtual void TearDown() { @@ -111,7 +111,7 @@ class DllRedirectorTest : public testing::Test { } // Opens the named beacon and returns the version. - base::Version* OpenAndReadVersionFromBeacon(const std::string& name) { + Version* OpenAndReadVersionFromBeacon(const std::string& name) { // Abort the test if we can't open and map the named memory object. EXPECT_TRUE(shared_memory_->Open(name, true /* read_only */)); EXPECT_TRUE(shared_memory_->Map(0)); @@ -119,7 +119,7 @@ class DllRedirectorTest : public testing::Test { char buffer[kSharedMemorySize] = {0}; memcpy(buffer, shared_memory_->memory(), kSharedMemorySize - 1); - scoped_ptr<base::Version> version(new base::Version(buffer)); + scoped_ptr<Version> version(new Version(buffer)); if (!version->IsValid()) version.reset(); return version.release(); @@ -131,8 +131,8 @@ class DllRedirectorTest : public testing::Test { // Shared memory segment that contains the version beacon. scoped_ptr<base::SharedMemory> shared_memory_; - scoped_ptr<base::Version> mock_version_; - scoped_ptr<base::Version> mock_version2_; + scoped_ptr<Version> mock_version_; + scoped_ptr<Version> mock_version2_; }; TEST_F(DllRedirectorTest, RegisterAsFirstModule) { @@ -143,12 +143,12 @@ TEST_F(DllRedirectorTest, RegisterAsFirstModule) { base::SharedMemory* redirector_memory = redirector->shared_memory(); char buffer[kSharedMemorySize] = {0}; memcpy(buffer, redirector_memory->memory(), kSharedMemorySize - 1); - base::Version redirector_version(buffer); + Version redirector_version(buffer); ASSERT_TRUE(redirector_version.IsValid()); EXPECT_TRUE(redirector_version.Equals(*mock_version_.get())); redirector_memory = NULL; - scoped_ptr<base::Version> memory_version( + scoped_ptr<Version> memory_version( OpenAndReadVersionFromBeacon(kTestVersionBeaconName)); ASSERT_TRUE(memory_version.get()); EXPECT_TRUE(redirector_version.Equals(*memory_version.get())); @@ -167,9 +167,9 @@ TEST_F(DllRedirectorTest, SecondModuleLoading) { new MockDllRedirector2(kTestVersionBeaconName)); EXPECT_FALSE(second_redirector->RegisterAsFirstCFModule()); - scoped_ptr<base::Version> first_redirector_version( + scoped_ptr<Version> first_redirector_version( first_redirector->GetFirstModuleVersion()); - scoped_ptr<base::Version> second_redirector_version( + scoped_ptr<Version> second_redirector_version( second_redirector->GetFirstModuleVersion()); EXPECT_TRUE( @@ -189,9 +189,9 @@ TEST_F(DllRedirectorTest, TestBeaconOwnershipHandoff) { new MockDllRedirector2(kTestVersionBeaconName)); EXPECT_FALSE(second_redirector->RegisterAsFirstCFModule()); - scoped_ptr<base::Version> first_redirector_version( + scoped_ptr<Version> first_redirector_version( first_redirector->GetFirstModuleVersion()); - scoped_ptr<base::Version> second_redirector_version( + scoped_ptr<Version> second_redirector_version( second_redirector->GetFirstModuleVersion()); EXPECT_TRUE( @@ -207,7 +207,7 @@ TEST_F(DllRedirectorTest, TestBeaconOwnershipHandoff) { new MockDllRedirector2(kTestVersionBeaconName)); EXPECT_FALSE(third_redirector->RegisterAsFirstCFModule()); - scoped_ptr<base::Version> third_redirector_version( + scoped_ptr<Version> third_redirector_version( third_redirector->GetFirstModuleVersion()); EXPECT_TRUE( @@ -224,7 +224,7 @@ TEST_F(DllRedirectorTest, TestBeaconOwnershipHandoff) { new MockDllRedirector2(kTestVersionBeaconName)); EXPECT_TRUE(fourth_redirector->RegisterAsFirstCFModule()); - scoped_ptr<base::Version> fourth_redirector_version( + scoped_ptr<Version> fourth_redirector_version( fourth_redirector->GetFirstModuleVersion()); EXPECT_TRUE( @@ -281,7 +281,7 @@ TEST_F(DllRedirectorTest, LockSquatting) { new MockDllRedirector2(kTestVersionBeaconName)); EXPECT_TRUE(second_redirector->RegisterAsFirstCFModule()); - scoped_ptr<base::Version> second_redirector_version( + scoped_ptr<Version> second_redirector_version( second_redirector->GetFirstModuleVersion()); EXPECT_TRUE( second_redirector_version->Equals(*mock_version2_.get())); diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 06047f0..d979dd9 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -306,9 +306,9 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, // the directory where chrome is installed. if (!version_info) { BrowserDistribution* dist = BrowserDistribution::GetDistribution(); - base::Version ver_system; + Version ver_system; InstallUtil::GetChromeVersion(dist, true, &ver_system); - base::Version ver_user; + Version ver_user; InstallUtil::GetChromeVersion(dist, false, &ver_system); ASSERT_TRUE(ver_system.IsValid() || ver_user.IsValid()); |