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

Unified Diff: chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
diff --git a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
index 30ff398ded212af266462b82a21b381fc2d6e5ac..058fb8f3e4c021d50f06b9c54d95a6f4ca2eeb57 100644
--- a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
+++ b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
@@ -49,14 +49,14 @@ class TestPreferenceAPI : public PreferenceAPIBase {
private:
// PreferenceAPIBase implementation.
- virtual ExtensionPrefs* extension_prefs() OVERRIDE {
+ virtual ExtensionPrefs* extension_prefs() override {
return test_extension_prefs_->prefs();
}
- virtual ExtensionPrefValueMap* extension_pref_value_map() OVERRIDE {
+ virtual ExtensionPrefValueMap* extension_pref_value_map() override {
return test_extension_prefs_->extension_pref_value_map();
}
virtual scoped_refptr<ContentSettingsStore> content_settings_store()
- OVERRIDE {
+ override {
return content_settings_->content_settings_store();
}
@@ -72,7 +72,7 @@ class ExtensionControlledPrefsTest : public PrefsPrepopulatedTestBase {
virtual ~ExtensionControlledPrefsTest();
virtual void RegisterPreferences(user_prefs::PrefRegistrySyncable* registry)
- OVERRIDE;
+ override;
void InstallExtensionControlledPref(Extension* extension,
const std::string& key,
base::Value* value);
@@ -194,12 +194,12 @@ void ExtensionControlledPrefsTest::EnsureExtensionUninstalled(
class ControlledPrefsInstallOneExtension
: public ExtensionControlledPrefsTest {
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(extension1(),
kPref1,
new base::StringValue("val1"));
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ("val1", actual);
}
@@ -211,7 +211,7 @@ TEST_F(ControlledPrefsInstallOneExtension,
class ControlledPrefsInstallIncognitoPersistent
: public ExtensionControlledPrefsTest {
public:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
InstallExtensionControlledPrefIncognito(
@@ -221,7 +221,7 @@ class ControlledPrefsInstallIncognitoPersistent
EXPECT_EQ("val2", actual);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
// Main pref service shall see only non-incognito settings.
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ("val1", actual);
@@ -240,7 +240,7 @@ class ControlledPrefsInstallIncognitoSessionOnly
public:
ControlledPrefsInstallIncognitoSessionOnly() : iteration_(0) {}
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
InstallExtensionControlledPrefIncognitoSessionOnly(
@@ -249,7 +249,7 @@ class ControlledPrefsInstallIncognitoSessionOnly
std::string actual = incog_prefs->GetString(kPref1);
EXPECT_EQ("val2", actual);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
// Main pref service shall see only non-incognito settings.
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ("val1", actual);
@@ -271,7 +271,7 @@ TEST_F(ControlledPrefsInstallIncognitoSessionOnly,
ControlledPrefsInstallIncognitoSessionOnly) { }
class ControlledPrefsUninstallExtension : public ExtensionControlledPrefsTest {
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
InstallExtensionControlledPref(
@@ -288,7 +288,7 @@ class ControlledPrefsUninstallExtension : public ExtensionControlledPrefsTest {
UninstallExtension(extension1()->id());
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
EXPECT_FALSE(prefs()->HasPrefForExtension(extension1()->id()));
std::string actual;
@@ -303,7 +303,7 @@ TEST_F(ControlledPrefsUninstallExtension,
// Tests triggering of notifications to registered observers.
class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest {
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
using testing::_;
using testing::Mock;
using testing::StrEq;
@@ -368,7 +368,7 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest {
registrar.Remove(kPref1);
incognito_registrar.Remove(kPref1);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ(kDefaultPref1, actual);
}
@@ -378,14 +378,14 @@ TEST_F(ControlledPrefsNotifyWhenNeeded,
// Tests disabling an extension.
class ControlledPrefsDisableExtension : public ExtensionControlledPrefsTest {
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ("val1", actual);
prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ(kDefaultPref1, actual);
}
@@ -394,13 +394,13 @@ TEST_F(ControlledPrefsDisableExtension, ControlledPrefsDisableExtension) { }
// Tests disabling and reenabling an extension.
class ControlledPrefsReenableExtension : public ExtensionControlledPrefsTest {
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED);
prefs()->SetExtensionState(extension1()->id(), Extension::ENABLED);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
std::string actual = prefs()->pref_service()->GetString(kPref1);
EXPECT_EQ("val1", actual);
}
@@ -422,7 +422,7 @@ class MockStringValue : public base::StringValue {
class ControlledPrefsSetExtensionControlledPref
: public ExtensionControlledPrefsTest {
public:
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
MockStringValue* v1 = new MockStringValue("https://www.chromium.org");
MockStringValue* v2 = new MockStringValue("https://www.chromium.org");
MockStringValue* v1i = new MockStringValue("https://www.chromium.org");
@@ -448,7 +448,7 @@ class ControlledPrefsSetExtensionControlledPref
testing::Mock::VerifyAndClearExpectations(v2i);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
}
};
TEST_F(ControlledPrefsSetExtensionControlledPref,
@@ -461,13 +461,13 @@ class ControlledPrefsDisableExtensions : public ExtensionControlledPrefsTest {
ControlledPrefsDisableExtensions()
: iteration_(0) {}
virtual ~ControlledPrefsDisableExtensions() {}
- virtual void Initialize() OVERRIDE {
+ virtual void Initialize() override {
InstallExtensionControlledPref(
extension1(), kPref1, new base::StringValue("val1"));
// This becomes only active in the second verification phase.
prefs_.set_extensions_disabled(true);
}
- virtual void Verify() OVERRIDE {
+ virtual void Verify() override {
std::string actual = prefs()->pref_service()->GetString(kPref1);
if (iteration_ == 0) {
EXPECT_EQ("val1", actual);

Powered by Google App Engine
This is Rietveld 408576698