Skip to content

Commit

Permalink
replace OVERRIDE and FINAL with override and final in net/
Browse files Browse the repository at this point in the history
BUG=417463

Review URL: https://codereview.chromium.org/623213004

Cr-Commit-Position: refs/heads/master@{#298844}
  • Loading branch information
mostynb authored and Commit bot committed Oct 9, 2014
1 parent c239532 commit ba063d6
Show file tree
Hide file tree
Showing 488 changed files with 3,677 additions and 3,677 deletions.
4 changes: 2 additions & 2 deletions net/android/network_change_notifier_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ class NetworkChangeNotifierAndroid::DnsConfigServiceThread
Stop();
}

virtual void Init() OVERRIDE {
virtual void Init() override {
address_tracker_.Init();
dns_config_service_ = DnsConfigService::CreateSystemService();
dns_config_service_->WatchConfig(
base::Bind(&NetworkChangeNotifier::SetDnsConfig));
}

virtual void CleanUp() OVERRIDE {
virtual void CleanUp() override {
dns_config_service_.reset();
}

Expand Down
4 changes: 2 additions & 2 deletions net/android/network_change_notifier_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierAndroid
virtual ~NetworkChangeNotifierAndroid();

// NetworkChangeNotifier:
virtual ConnectionType GetCurrentConnectionType() const OVERRIDE;
virtual ConnectionType GetCurrentConnectionType() const override;

// NetworkChangeNotifierDelegateAndroid::Observer:
virtual void OnConnectionTypeChanged() OVERRIDE;
virtual void OnConnectionTypeChanged() override;

static bool Register(JNIEnv* env);

Expand Down
4 changes: 2 additions & 2 deletions net/android/network_change_notifier_android_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NetworkChangeNotifierDelegateAndroidObserver
NetworkChangeNotifierDelegateAndroidObserver() : notifications_count_(0) {}

// NetworkChangeNotifierDelegateAndroid::Observer:
virtual void OnConnectionTypeChanged() OVERRIDE {
virtual void OnConnectionTypeChanged() override {
notifications_count_++;
}

Expand All @@ -43,7 +43,7 @@ class NetworkChangeNotifierObserver

// NetworkChangeNotifier::Observer:
virtual void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType connection_type) OVERRIDE {
NetworkChangeNotifier::ConnectionType connection_type) override {
notifications_count_++;
}

Expand Down
2 changes: 1 addition & 1 deletion net/android/network_change_notifier_factory_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NET_EXPORT NetworkChangeNotifierFactoryAndroid :
virtual ~NetworkChangeNotifierFactoryAndroid();

// NetworkChangeNotifierFactory:
virtual NetworkChangeNotifier* CreateInstance() OVERRIDE;
virtual NetworkChangeNotifier* CreateInstance() override;

private:
// Delegate passed to the instances created by this class.
Expand Down
4 changes: 2 additions & 2 deletions net/base/address_tracker_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux :
void AbortAndForceOnline();

// MessageLoopForIO::Watcher:
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE;
virtual void OnFileCanReadWithoutBlocking(int fd) override;
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override;

// Close |netlink_fd_|
void CloseSocket();
Expand Down
2 changes: 1 addition & 1 deletion net/base/backoff_entry_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestBackoffEntry : public BackoffEntry {

virtual ~TestBackoffEntry() {}

virtual TimeTicks ImplGetTimeNow() const OVERRIDE {
virtual TimeTicks ImplGetTimeNow() const override {
return now_;
}

Expand Down
2 changes: 1 addition & 1 deletion net/base/capturing_net_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class CapturingNetLog : public NetLog {

private:
// ThreadSafeObserver implementation:
virtual void OnAddEntry(const Entry& entry) OVERRIDE;
virtual void OnAddEntry(const Entry& entry) override;

// Needs to be "mutable" so can use it in GetEntries().
mutable base::Lock lock_;
Expand Down
6 changes: 3 additions & 3 deletions net/base/directory_lister_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
}

virtual void OnListFile(
const DirectoryLister::DirectoryListerData& data) OVERRIDE {
const DirectoryLister::DirectoryListerData& data) override {
file_list_.push_back(data.info);
paths_.push_back(data.path);
if (quit_loop_after_each_file_)
base::MessageLoop::current()->Quit();
}

virtual void OnListDone(int error) OVERRIDE {
virtual void OnListDone(int error) override {
error_ = error;
base::MessageLoop::current()->Quit();
if (recursive_)
Expand Down Expand Up @@ -93,7 +93,7 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
class DirectoryListerTest : public PlatformTest {
public:

virtual void SetUp() OVERRIDE {
virtual void SetUp() override {
const int kMaxDepth = 3;
const int kBranchingFactor = 4;
const int kFilesPerDirectory = 5;
Expand Down
2 changes: 1 addition & 1 deletion net/base/dns_reloader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DnsReloader : public net::NetworkChangeNotifier::DNSObserver {
};

// NetworkChangeNotifier::DNSObserver:
virtual void OnDNSChanged() OVERRIDE {
virtual void OnDNSChanged() override {
DCHECK(base::MessageLoopForIO::IsCurrent());
base::AutoLock l(lock_);
resolver_generation_++;
Expand Down
2 changes: 1 addition & 1 deletion net/base/file_stream_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class FileStream::Context {
// Implementation of MessageLoopForIO::IOHandler.
virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
DWORD bytes_read,
DWORD error) OVERRIDE;
DWORD error) override;
#elif defined(OS_POSIX)
// ReadFileImpl() is a simple wrapper around read() that handles EINTR
// signals and calls RecordAndMapError() to map errno to net error codes.
Expand Down
4 changes: 2 additions & 2 deletions net/base/keygen_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class StubCryptoModuleDelegate : public crypto::NSSCryptoModuleDelegate {

virtual std::string RequestPassword(const std::string& slot_name,
bool retry,
bool* cancelled) OVERRIDE{
bool* cancelled) override{
return std::string();
}

virtual crypto::ScopedPK11Slot RequestSlot() OVERRIDE {
virtual crypto::ScopedPK11Slot RequestSlot() override {
return crypto::ScopedPK11Slot(PK11_ReferenceSlot(slot_.get()));
}

Expand Down
8 changes: 4 additions & 4 deletions net/base/mock_file_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class MockFileStream : public net::FileStream {

// FileStream methods.
virtual int Seek(base::File::Whence whence, int64 offset,
const Int64CompletionCallback& callback) OVERRIDE;
const Int64CompletionCallback& callback) override;
virtual int Read(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) OVERRIDE;
const CompletionCallback& callback) override;
virtual int Write(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) OVERRIDE;
virtual int Flush(const CompletionCallback& callback) OVERRIDE;
const CompletionCallback& callback) override;
virtual int Flush(const CompletionCallback& callback) override;

void set_forced_error_async(int error) {
forced_error_ = error;
Expand Down
2 changes: 1 addition & 1 deletion net/base/net_log_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class NET_EXPORT NetLogLogger : public NetLog::ThreadSafeObserver {
void StopObserving();

// net::NetLog::ThreadSafeObserver implementation:
virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE;
virtual void OnAddEntry(const NetLog::Entry& entry) override;

// Create a dictionary containing legend for net/ constants. Caller takes
// ownership of returned value.
Expand Down
10 changes: 5 additions & 5 deletions net/base/net_log_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CountingObserver : public NetLog::ThreadSafeObserver {
net_log()->RemoveThreadSafeObserver(this);
}

virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE {
virtual void OnAddEntry(const NetLog::Entry& entry) override {
++count_;
}

Expand All @@ -99,7 +99,7 @@ class LoggingObserver : public NetLog::ThreadSafeObserver {
net_log()->RemoveThreadSafeObserver(this);
}

virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE {
virtual void OnAddEntry(const NetLog::Entry& entry) override {
base::Value* value = entry.ToValue();
base::DictionaryValue* dict = NULL;
ASSERT_TRUE(value->GetAsDictionary(&dict));
Expand Down Expand Up @@ -138,7 +138,7 @@ class NetLogTestThread : public base::SimpleThread {
net_log_ = net_log;
}

virtual void Run() OVERRIDE {
virtual void Run() override {
start_event_->Wait();
RunTestThread();
}
Expand All @@ -165,7 +165,7 @@ class AddEventsTestThread : public NetLogTestThread {
virtual ~AddEventsTestThread() {}

private:
virtual void RunTestThread() OVERRIDE {
virtual void RunTestThread() override {
for (int i = 0; i < kEvents; ++i)
AddEvent(net_log_);
}
Expand All @@ -183,7 +183,7 @@ class AddRemoveObserverTestThread : public NetLogTestThread {
}

private:
virtual void RunTestThread() OVERRIDE {
virtual void RunTestThread() override {
for (int i = 0; i < kEvents; ++i) {
ASSERT_FALSE(observer_.net_log());

Expand Down
4 changes: 2 additions & 2 deletions net/base/net_util_icu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class HostComponentTransform : public AppendComponentTransform {
private:
virtual base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const OVERRIDE {
base::OffsetAdjuster::Adjustments* adjustments) const override {
return IDNToUnicodeWithAdjustments(component_text, languages_,
adjustments);
}
Expand All @@ -510,7 +510,7 @@ class NonHostComponentTransform : public AppendComponentTransform {
private:
virtual base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const OVERRIDE {
base::OffsetAdjuster::Adjustments* adjustments) const override {
return (unescape_rules_ == UnescapeRule::NONE) ?
base::UTF8ToUTF16WithAdjustments(component_text, adjustments) :
UnescapeAndDecodeUTF8URLComponentWithAdjustments(component_text,
Expand Down
14 changes: 7 additions & 7 deletions net/base/network_change_notifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ NetworkChangeNotifierFactory* g_network_change_notifier_factory = NULL;

class MockNetworkChangeNotifier : public NetworkChangeNotifier {
public:
virtual ConnectionType GetCurrentConnectionType() const OVERRIDE {
virtual ConnectionType GetCurrentConnectionType() const override {
return CONNECTION_UNKNOWN;
}
};
Expand Down Expand Up @@ -93,7 +93,7 @@ class HistogramWatcher
}

// NetworkChangeNotifier::IPAddressObserver implementation.
virtual void OnIPAddressChanged() OVERRIDE {
virtual void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.IPAddressChange",
SinceLast(&last_ip_address_change_));
Expand All @@ -104,7 +104,7 @@ class HistogramWatcher

// NetworkChangeNotifier::ConnectionTypeObserver implementation.
virtual void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType type) OVERRIDE {
NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeTicks now = base::TimeTicks::Now();
int32 kilobytes_read = bytes_read_since_last_connection_change_ / 1000;
Expand Down Expand Up @@ -264,15 +264,15 @@ class HistogramWatcher
}

// NetworkChangeNotifier::DNSObserver implementation.
virtual void OnDNSChanged() OVERRIDE {
virtual void OnDNSChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.DNSConfigChange",
SinceLast(&last_dns_change_));
}

// NetworkChangeNotifier::NetworkChangeObserver implementation.
virtual void OnNetworkChanged(
NetworkChangeNotifier::ConnectionType type) OVERRIDE {
NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
if (type != NetworkChangeNotifier::CONNECTION_NONE) {
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.NetworkOnlineChange",
Expand Down Expand Up @@ -432,7 +432,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
}

// NetworkChangeNotifier::IPAddressObserver implementation.
virtual void OnIPAddressChanged() OVERRIDE {
virtual void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
? params_.ip_address_offline_delay_ : params_.ip_address_online_delay_;
Expand All @@ -441,7 +441,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
}

// NetworkChangeNotifier::ConnectionTypeObserver implementation.
virtual void OnConnectionTypeChanged(ConnectionType type) OVERRIDE {
virtual void OnConnectionTypeChanged(ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
pending_connection_type_ = type;
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
Expand Down
4 changes: 2 additions & 2 deletions net/base/network_change_notifier_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class NetworkChangeNotifierLinux::Thread : public base::Thread {

protected:
// base::Thread
virtual void Init() OVERRIDE;
virtual void CleanUp() OVERRIDE;
virtual void Init() override;
virtual void CleanUp() override;

private:
scoped_ptr<DnsConfigService> dns_config_service_;
Expand Down
4 changes: 2 additions & 2 deletions net/base/network_change_notifier_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierLinux
static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsLinux();

// NetworkChangeNotifier:
virtual ConnectionType GetCurrentConnectionType() const OVERRIDE;
virtual ConnectionType GetCurrentConnectionType() const override;

virtual const internal::AddressTrackerLinux*
GetAddressTrackerInternal() const OVERRIDE;
GetAddressTrackerInternal() const override;

// The thread used to listen for notifications. This relays the notification
// to the registered observers without posting back to the thread the object
Expand Down
4 changes: 2 additions & 2 deletions net/base/network_change_notifier_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class NetworkChangeNotifierMac::DnsConfigServiceThread : public base::Thread {
Stop();
}

virtual void Init() OVERRIDE {
virtual void Init() override {
service_ = DnsConfigService::CreateSystemService();
service_->WatchConfig(base::Bind(&NetworkChangeNotifier::SetDnsConfig));
}

virtual void CleanUp() OVERRIDE {
virtual void CleanUp() override {
service_.reset();
}

Expand Down
10 changes: 5 additions & 5 deletions net/base/network_change_notifier_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
virtual ~NetworkChangeNotifierMac();

// NetworkChangeNotifier implementation:
virtual ConnectionType GetCurrentConnectionType() const OVERRIDE;
virtual ConnectionType GetCurrentConnectionType() const override;

// Forwarder just exists to keep the NetworkConfigWatcherMac API out of
// NetworkChangeNotifierMac's public API.
Expand All @@ -34,11 +34,11 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
: net_config_watcher_(net_config_watcher) {}

// NetworkConfigWatcherMac::Delegate implementation:
virtual void Init() OVERRIDE;
virtual void StartReachabilityNotifications() OVERRIDE;
virtual void Init() override;
virtual void StartReachabilityNotifications() override;
virtual void SetDynamicStoreNotificationKeys(
SCDynamicStoreRef store) OVERRIDE;
virtual void OnNetworkConfigChange(CFArrayRef changed_keys) OVERRIDE;
SCDynamicStoreRef store) override;
virtual void OnNetworkConfigChange(CFArrayRef changed_keys) override;

private:
NetworkChangeNotifierMac* const net_config_watcher_;
Expand Down
4 changes: 2 additions & 2 deletions net/base/network_change_notifier_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class NetworkChangeNotifierWin::DnsConfigServiceThread : public base::Thread {
Stop();
}

virtual void Init() OVERRIDE {
virtual void Init() override {
service_ = DnsConfigService::CreateSystemService();
service_->WatchConfig(base::Bind(&NetworkChangeNotifier::SetDnsConfig));
}

virtual void CleanUp() OVERRIDE {
virtual void CleanUp() override {
service_.reset();
}

Expand Down
4 changes: 2 additions & 2 deletions net/base/network_change_notifier_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierWin
friend class NetworkChangeNotifierWinTest;

// NetworkChangeNotifier methods:
virtual ConnectionType GetCurrentConnectionType() const OVERRIDE;
virtual ConnectionType GetCurrentConnectionType() const override;

// ObjectWatcher::Delegate methods:
// Must only be called on the thread |this| was created on.
virtual void OnObjectSignaled(HANDLE object) OVERRIDE;
virtual void OnObjectSignaled(HANDLE object) override;

// Does the actual work to determine the current connection type.
// It is not thread safe, see crbug.com/324913.
Expand Down
2 changes: 1 addition & 1 deletion net/base/network_change_notifier_win_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TestNetworkChangeNotifierWin : public NetworkChangeNotifierWin {

// From NetworkChangeNotifierWin.
virtual NetworkChangeNotifier::ConnectionType
RecomputeCurrentConnectionType() const OVERRIDE {
RecomputeCurrentConnectionType() const override {
return NetworkChangeNotifier::CONNECTION_UNKNOWN;
}

Expand Down
Loading

0 comments on commit ba063d6

Please sign in to comment.