Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2848)

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_sync_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 6dae5fc968dd1f72e28ce001abc732e0370e49d1..eafc32d675cc8e222fadab87b2032c99d27f6e62 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -250,7 +250,7 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
visit_count_++;
for (DataMap::const_iterator i = extension_map_.begin();
i != extension_map_.end(); ++i) {
- base::Version version(i->second.first);
+ Version version(i->second.first);
visitor_->OnExternalExtensionFileFound(
i->first, &version, i->second.second, location_,
@@ -266,13 +266,13 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
virtual bool GetExtensionDetails(
const std::string& id,
Manifest::Location* location,
- scoped_ptr<base::Version>* version) const OVERRIDE {
+ scoped_ptr<Version>* version) const OVERRIDE {
DataMap::const_iterator it = extension_map_.find(id);
if (it == extension_map_.end())
return false;
if (version)
- version->reset(new base::Version(it->second.first));
+ version->reset(new Version(it->second.first));
if (location)
*location = location_;
@@ -361,7 +361,7 @@ class MockProviderVisitor
}
virtual bool OnExternalExtensionFileFound(const std::string& id,
- const base::Version* version,
+ const Version* version,
const base::FilePath& path,
Manifest::Location unused,
int creation_flags,
@@ -385,13 +385,13 @@ class MockProviderVisitor
// Ask provider if the extension we got back is registered.
Manifest::Location location = Manifest::INVALID_LOCATION;
- scoped_ptr<base::Version> v1;
+ scoped_ptr<Version> v1;
base::FilePath crx_path;
EXPECT_TRUE(provider_->GetExtensionDetails(id, NULL, &v1));
EXPECT_STREQ(version->GetString().c_str(), v1->GetString().c_str());
- scoped_ptr<base::Version> v2;
+ scoped_ptr<Version> v2;
EXPECT_TRUE(provider_->GetExtensionDetails(id, &location, &v2));
EXPECT_STREQ(version->GetString().c_str(), v1->GetString().c_str());
EXPECT_STREQ(version->GetString().c_str(), v2->GetString().c_str());
@@ -421,7 +421,7 @@ class MockProviderVisitor
EXPECT_TRUE(provider_->HasExtension(id));
// External extensions with update URLs do not have versions.
- scoped_ptr<base::Version> v1;
+ scoped_ptr<Version> v1;
Manifest::Location location1 = Manifest::INVALID_LOCATION;
EXPECT_TRUE(provider_->GetExtensionDetails(id, &location1, &v1));
EXPECT_FALSE(v1.get());
@@ -1777,7 +1777,7 @@ TEST_F(ExtensionServiceTest, InstallingExternalExtensionWithFlags) {
set_extensions_enabled(true);
// Register and install an external extension.
- base::Version version("1.0.0.0");
+ Version version("1.0.0.0");
content::WindowedNotificationObserver observer(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
@@ -1813,7 +1813,7 @@ TEST_F(ExtensionServiceTest, UninstallingExternalExtensions) {
set_extensions_enabled(true);
// Install an external extension.
- base::Version version("1.0.0.0");
+ Version version("1.0.0.0");
content::WindowedNotificationObserver observer(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
@@ -1839,7 +1839,7 @@ TEST_F(ExtensionServiceTest, UninstallingExternalExtensions) {
ValidateIntegerPref(good_crx, "location",
Extension::EXTERNAL_EXTENSION_UNINSTALLED);
- version = base::Version("1.0.0.1");
+ version = Version("1.0.0.1");
// Repeat the same thing with a newer version of the extension.
path = data_dir_.AppendASCII("good2.crx");
service_->OnExternalExtensionFileFound(good_crx, &version,
@@ -1895,7 +1895,7 @@ TEST_F(ExtensionServiceTest, FailOnWrongId) {
base::FilePath path = data_dir_.AppendASCII("good.crx");
set_extensions_enabled(true);
- base::Version version("1.0.0.0");
+ Version version("1.0.0.0");
const std::string wrong_id = all_zero;
const std::string correct_id = good_crx;
@@ -1933,7 +1933,7 @@ TEST_F(ExtensionServiceTest, FailOnWrongVersion) {
// Install an external extension with a version from the external
// source that is not equal to the version in the extension manifest.
- base::Version wrong_version("1.2.3.4");
+ Version wrong_version("1.2.3.4");
content::WindowedNotificationObserver observer(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
@@ -1946,7 +1946,7 @@ TEST_F(ExtensionServiceTest, FailOnWrongVersion) {
// Try again with the right version. Expect success.
service_->pending_extension_manager()->Remove(good_crx);
- base::Version correct_version("1.0.0.0");
+ Version correct_version("1.0.0.0");
content::WindowedNotificationObserver observer2(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
@@ -3351,7 +3351,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled) {
// Use AddExtensionImpl() as AddFrom*() would balk.
service_->pending_extension_manager()->AddExtensionImpl(
good->id(), extensions::ManifestURL::GetUpdateURL(good),
- base::Version(), &IsExtension, kGoodIsFromSync,
+ Version(), &IsExtension, kGoodIsFromSync,
kGoodInstallSilently, Manifest::INTERNAL,
Extension::NO_FLAGS, false);
UpdateExtension(good->id(), path, ENABLED);
@@ -6076,8 +6076,8 @@ TEST_F(ExtensionServiceTest, InstallPriorityExternalUpdateUrl) {
}
TEST_F(ExtensionServiceTest, InstallPriorityExternalLocalFile) {
- base::Version older_version("0.1.0.0");
- base::Version newer_version("2.0.0.0");
+ Version older_version("0.1.0.0");
+ Version newer_version("2.0.0.0");
// We don't want the extension to be installed. A path that doesn't
// point to a valid CRX ensures this.
@@ -6255,9 +6255,9 @@ TEST_F(ExtensionServiceTest, InstallPriorityExternalLocalFile) {
}
TEST_F(ExtensionServiceTest, ConcurrentExternalLocalFile) {
- base::Version kVersion123("1.2.3");
- base::Version kVersion124("1.2.4");
- base::Version kVersion125("1.2.5");
+ Version kVersion123("1.2.3");
+ Version kVersion124("1.2.4");
+ Version kVersion125("1.2.5");
const base::FilePath kInvalidPathToCrx = base::FilePath();
const int kCreationFlags = 0;
const bool kDontMarkAcknowledged = false;
@@ -6361,7 +6361,7 @@ class ExtensionSourcePriorityTest : public ExtensionServiceTest {
// Fake an external file from external_extensions.json.
bool AddPendingExternalPrefFileInstall() {
- base::Version version("1.0.0.0");
+ Version version("1.0.0.0");
return service_->OnExternalExtensionFileFound(
crx_id_, &version, crx_path_, Manifest::EXTERNAL_PREF,
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698