| 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 dc16b72c1aa2233edc4c85e8ccc81db407236daa..2dbf5c78480034783d71277c9e25290c8ba8207b 100644
|
| --- a/chrome/browser/extensions/extension_service_unittest.cc
|
| +++ b/chrome/browser/extensions/extension_service_unittest.cc
|
| @@ -248,7 +248,7 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| visit_count_++;
|
| for (DataMap::const_iterator i = extension_map_.begin();
|
| i != extension_map_.end(); ++i) {
|
| - Version version(i->second.first);
|
| + base::Version version(i->second.first);
|
|
|
| visitor_->OnExternalExtensionFileFound(
|
| i->first, &version, i->second.second, location_,
|
| @@ -264,13 +264,13 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| virtual bool GetExtensionDetails(
|
| const std::string& id,
|
| Manifest::Location* location,
|
| - scoped_ptr<Version>* version) const OVERRIDE {
|
| + scoped_ptr<base::Version>* version) const OVERRIDE {
|
| DataMap::const_iterator it = extension_map_.find(id);
|
| if (it == extension_map_.end())
|
| return false;
|
|
|
| if (version)
|
| - version->reset(new Version(it->second.first));
|
| + version->reset(new base::Version(it->second.first));
|
|
|
| if (location)
|
| *location = location_;
|
| @@ -359,7 +359,7 @@ class MockProviderVisitor
|
| }
|
|
|
| virtual bool OnExternalExtensionFileFound(const std::string& id,
|
| - const Version* version,
|
| + const base::Version* version,
|
| const base::FilePath& path,
|
| Manifest::Location unused,
|
| int creation_flags,
|
| @@ -383,13 +383,13 @@ class MockProviderVisitor
|
|
|
| // Ask provider if the extension we got back is registered.
|
| Manifest::Location location = Manifest::INVALID_LOCATION;
|
| - scoped_ptr<Version> v1;
|
| + scoped_ptr<base::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<Version> v2;
|
| + scoped_ptr<base::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());
|
| @@ -419,7 +419,7 @@ class MockProviderVisitor
|
| EXPECT_TRUE(provider_->HasExtension(id));
|
|
|
| // External extensions with update URLs do not have versions.
|
| - scoped_ptr<Version> v1;
|
| + scoped_ptr<base::Version> v1;
|
| Manifest::Location location1 = Manifest::INVALID_LOCATION;
|
| EXPECT_TRUE(provider_->GetExtensionDetails(id, &location1, &v1));
|
| EXPECT_FALSE(v1.get());
|
| @@ -1775,7 +1775,7 @@ TEST_F(ExtensionServiceTest, InstallingExternalExtensionWithFlags) {
|
| set_extensions_enabled(true);
|
|
|
| // Register and install an external extension.
|
| - Version version("1.0.0.0");
|
| + base::Version version("1.0.0.0");
|
| content::WindowedNotificationObserver observer(
|
| chrome::NOTIFICATION_CRX_INSTALLER_DONE,
|
| content::NotificationService::AllSources());
|
| @@ -1811,7 +1811,7 @@ TEST_F(ExtensionServiceTest, UninstallingExternalExtensions) {
|
| set_extensions_enabled(true);
|
|
|
| // Install an external extension.
|
| - Version version("1.0.0.0");
|
| + base::Version version("1.0.0.0");
|
| content::WindowedNotificationObserver observer(
|
| chrome::NOTIFICATION_CRX_INSTALLER_DONE,
|
| content::NotificationService::AllSources());
|
| @@ -1837,7 +1837,7 @@ TEST_F(ExtensionServiceTest, UninstallingExternalExtensions) {
|
| ValidateIntegerPref(good_crx, "location",
|
| Extension::EXTERNAL_EXTENSION_UNINSTALLED);
|
|
|
| - version = Version("1.0.0.1");
|
| + version = base::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,
|
| @@ -1893,7 +1893,7 @@ TEST_F(ExtensionServiceTest, FailOnWrongId) {
|
| base::FilePath path = data_dir_.AppendASCII("good.crx");
|
| set_extensions_enabled(true);
|
|
|
| - Version version("1.0.0.0");
|
| + base::Version version("1.0.0.0");
|
|
|
| const std::string wrong_id = all_zero;
|
| const std::string correct_id = good_crx;
|
| @@ -1931,7 +1931,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.
|
| - Version wrong_version("1.2.3.4");
|
| + base::Version wrong_version("1.2.3.4");
|
| content::WindowedNotificationObserver observer(
|
| chrome::NOTIFICATION_CRX_INSTALLER_DONE,
|
| content::NotificationService::AllSources());
|
| @@ -1944,7 +1944,7 @@ TEST_F(ExtensionServiceTest, FailOnWrongVersion) {
|
|
|
| // Try again with the right version. Expect success.
|
| service_->pending_extension_manager()->Remove(good_crx);
|
| - Version correct_version("1.0.0.0");
|
| + base::Version correct_version("1.0.0.0");
|
| content::WindowedNotificationObserver observer2(
|
| chrome::NOTIFICATION_CRX_INSTALLER_DONE,
|
| content::NotificationService::AllSources());
|
| @@ -3349,7 +3349,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled) {
|
| // Use AddExtensionImpl() as AddFrom*() would balk.
|
| service_->pending_extension_manager()->AddExtensionImpl(
|
| good->id(), extensions::ManifestURL::GetUpdateURL(good),
|
| - Version(), &IsExtension, kGoodIsFromSync,
|
| + base::Version(), &IsExtension, kGoodIsFromSync,
|
| kGoodInstallSilently, Manifest::INTERNAL,
|
| Extension::NO_FLAGS, false);
|
| UpdateExtension(good->id(), path, ENABLED);
|
| @@ -6064,8 +6064,8 @@ TEST_F(ExtensionServiceTest, InstallPriorityExternalUpdateUrl) {
|
| }
|
|
|
| TEST_F(ExtensionServiceTest, InstallPriorityExternalLocalFile) {
|
| - Version older_version("0.1.0.0");
|
| - Version newer_version("2.0.0.0");
|
| + base::Version older_version("0.1.0.0");
|
| + base::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.
|
| @@ -6243,9 +6243,9 @@ TEST_F(ExtensionServiceTest, InstallPriorityExternalLocalFile) {
|
| }
|
|
|
| TEST_F(ExtensionServiceTest, ConcurrentExternalLocalFile) {
|
| - Version kVersion123("1.2.3");
|
| - Version kVersion124("1.2.4");
|
| - Version kVersion125("1.2.5");
|
| + base::Version kVersion123("1.2.3");
|
| + base::Version kVersion124("1.2.4");
|
| + base::Version kVersion125("1.2.5");
|
| const base::FilePath kInvalidPathToCrx = base::FilePath();
|
| const int kCreationFlags = 0;
|
| const bool kDontMarkAcknowledged = false;
|
| @@ -6349,7 +6349,7 @@ class ExtensionSourcePriorityTest : public ExtensionServiceTest {
|
|
|
| // Fake an external file from external_extensions.json.
|
| bool AddPendingExternalPrefFileInstall() {
|
| - Version version("1.0.0.0");
|
| + base::Version version("1.0.0.0");
|
|
|
| return service_->OnExternalExtensionFileFound(
|
| crx_id_, &version, crx_path_, Manifest::EXTERNAL_PREF,
|
|
|