| 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 c7ab916c43165c7871aa9f828aa56bcb29e8a3b2..3e8614e81a004ed7608f70d19d1f7e8242f837a0 100644
|
| --- a/chrome/browser/extensions/extension_service_unittest.cc
|
| +++ b/chrome/browser/extensions/extension_service_unittest.cc
|
| @@ -242,7 +242,7 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| : location_(location), visitor_(visitor), visit_count_(0) {
|
| }
|
|
|
| - virtual ~MockExtensionProvider() {}
|
| + ~MockExtensionProvider() override {}
|
|
|
| void UpdateOrAddExtension(const std::string& id,
|
| const std::string& version,
|
| @@ -255,7 +255,7 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| }
|
|
|
| // ExternalProvider implementation:
|
| - virtual void VisitRegisteredExtension() override {
|
| + void VisitRegisteredExtension() override {
|
| visit_count_++;
|
| for (DataMap::const_iterator i = extension_map_.begin();
|
| i != extension_map_.end(); ++i) {
|
| @@ -268,14 +268,13 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| visitor_->OnExternalProviderReady(this);
|
| }
|
|
|
| - virtual bool HasExtension(const std::string& id) const override {
|
| + bool HasExtension(const std::string& id) const override {
|
| return extension_map_.find(id) != extension_map_.end();
|
| }
|
|
|
| - virtual bool GetExtensionDetails(
|
| - const std::string& id,
|
| - Manifest::Location* location,
|
| - scoped_ptr<Version>* version) const override {
|
| + bool GetExtensionDetails(const std::string& id,
|
| + Manifest::Location* location,
|
| + scoped_ptr<Version>* version) const override {
|
| DataMap::const_iterator it = extension_map_.find(id);
|
| if (it == extension_map_.end())
|
| return false;
|
| @@ -289,12 +288,9 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
|
| return true;
|
| }
|
|
|
| - virtual bool IsReady() const override {
|
| - return true;
|
| - }
|
| + bool IsReady() const override { return true; }
|
|
|
| - virtual void ServiceShutdown() override {
|
| - }
|
| + void ServiceShutdown() override {}
|
|
|
| int visit_count() const { return visit_count_; }
|
| void set_visit_count(int visit_count) {
|
| @@ -369,12 +365,12 @@ class MockProviderVisitor
|
| return ids_found_;
|
| }
|
|
|
| - virtual bool OnExternalExtensionFileFound(const std::string& id,
|
| - const Version* version,
|
| - const base::FilePath& path,
|
| - Manifest::Location unused,
|
| - int creation_flags,
|
| - bool mark_acknowledged) override {
|
| + bool OnExternalExtensionFileFound(const std::string& id,
|
| + const Version* version,
|
| + const base::FilePath& path,
|
| + Manifest::Location unused,
|
| + int creation_flags,
|
| + bool mark_acknowledged) override {
|
| EXPECT_EQ(expected_creation_flags_, creation_flags);
|
|
|
| ++ids_found_;
|
| @@ -412,13 +408,12 @@ class MockProviderVisitor
|
| return true;
|
| }
|
|
|
| - virtual bool OnExternalExtensionUpdateUrlFound(
|
| - const std::string& id,
|
| - const std::string& install_parameter,
|
| - const GURL& update_url,
|
| - Manifest::Location location,
|
| - int creation_flags,
|
| - bool mark_acknowledged) override {
|
| + bool OnExternalExtensionUpdateUrlFound(const std::string& id,
|
| + const std::string& install_parameter,
|
| + const GURL& update_url,
|
| + Manifest::Location location,
|
| + int creation_flags,
|
| + bool mark_acknowledged) override {
|
| ++ids_found_;
|
| base::DictionaryValue* pref;
|
| // This tests is to make sure that the provider only notifies us of the
|
| @@ -448,7 +443,7 @@ class MockProviderVisitor
|
| return true;
|
| }
|
|
|
| - virtual void OnExternalProviderReady(
|
| + void OnExternalProviderReady(
|
| const extensions::ExternalProviderInterface* provider) override {
|
| EXPECT_EQ(provider, provider_.get());
|
| EXPECT_TRUE(provider->IsReady());
|
| @@ -488,9 +483,9 @@ class ExtensionServiceTest : public extensions::ExtensionServiceTestBase,
|
| content::NotificationService::AllSources());
|
| }
|
|
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) override {
|
| + void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) override {
|
| switch (type) {
|
| case extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: {
|
| const Extension* extension =
|
| @@ -1154,10 +1149,10 @@ class PackExtensionTestClient : public extensions::PackExtensionJob::Client {
|
| public:
|
| PackExtensionTestClient(const base::FilePath& expected_crx_path,
|
| const base::FilePath& expected_private_key_path);
|
| - virtual void OnPackSuccess(const base::FilePath& crx_path,
|
| - const base::FilePath& private_key_path) override;
|
| - virtual void OnPackFailure(const std::string& error_message,
|
| - ExtensionCreator::ErrorType type) override;
|
| + void OnPackSuccess(const base::FilePath& crx_path,
|
| + const base::FilePath& private_key_path) override;
|
| + void OnPackFailure(const std::string& error_message,
|
| + ExtensionCreator::ErrorType type) override;
|
|
|
| private:
|
| const base::FilePath expected_crx_path_;
|
| @@ -1461,19 +1456,17 @@ TEST_F(ExtensionServiceTest, InstallExtension) {
|
|
|
| struct MockExtensionRegistryObserver
|
| : public extensions::ExtensionRegistryObserver {
|
| - virtual void OnExtensionWillBeInstalled(
|
| - content::BrowserContext* browser_context,
|
| - const Extension* extension,
|
| - bool is_update,
|
| - bool from_ephemeral,
|
| - const std::string& old_name) override {
|
| + void OnExtensionWillBeInstalled(content::BrowserContext* browser_context,
|
| + const Extension* extension,
|
| + bool is_update,
|
| + bool from_ephemeral,
|
| + const std::string& old_name) override {
|
| last_extension_installed = extension->id();
|
| }
|
|
|
| - virtual void OnExtensionUninstalled(
|
| - content::BrowserContext* browser_context,
|
| - const Extension* extension,
|
| - extensions::UninstallReason reason) override {
|
| + void OnExtensionUninstalled(content::BrowserContext* browser_context,
|
| + const Extension* extension,
|
| + extensions::UninstallReason reason) override {
|
| last_extension_uninstalled = extension->id();
|
| }
|
|
|
| @@ -5123,9 +5116,9 @@ class ExtensionsReadyRecorder : public content::NotificationObserver {
|
| bool ready() { return ready_; }
|
|
|
| private:
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) override {
|
| + void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) override {
|
| switch (type) {
|
| case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED:
|
| ready_ = true;
|
|
|