summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 17:24:00 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 17:24:00 +0000
commit800df5fae2689382fd79163979bd701869164c67 (patch)
tree5849c7de2e5e52febb3aa12eb2f4455232a7529a
parent39af6423fe192ee2bf8f7de138db2f7bf20d2621 (diff)
downloadchromium_src-800df5fae2689382fd79163979bd701869164c67.zip
chromium_src-800df5fae2689382fd79163979bd701869164c67.tar.gz
chromium_src-800df5fae2689382fd79163979bd701869164c67.tar.bz2
Add OVERRIDE throughout net/ftp/*
Review URL: http://codereview.chromium.org/7483012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93663 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/ftp/ftp_network_layer.h5
-rw-r--r--net/ftp/ftp_network_transaction.h14
-rw-r--r--net/ftp/ftp_network_transaction_unittest.cc45
3 files changed, 34 insertions, 30 deletions
diff --git a/net/ftp/ftp_network_layer.h b/net/ftp/ftp_network_layer.h
index de55192..2bc8511 100644
--- a/net/ftp/ftp_network_layer.h
+++ b/net/ftp/ftp_network_layer.h
@@ -6,6 +6,7 @@
#define NET_FTP_FTP_NETWORK_LAYER_H_
#pragma once
+#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "net/base/net_api.h"
#include "net/ftp/ftp_transaction_factory.h"
@@ -23,8 +24,8 @@ class NET_API FtpNetworkLayer : public FtpTransactionFactory {
static FtpTransactionFactory* CreateFactory(HostResolver* host_resolver);
// FtpTransactionFactory methods:
- virtual FtpTransaction* CreateTransaction();
- virtual void Suspend(bool suspend);
+ virtual FtpTransaction* CreateTransaction() OVERRIDE;
+ virtual void Suspend(bool suspend) OVERRIDE;
private:
scoped_refptr<FtpNetworkSession> session_;
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index 8500d27..459d5b1 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -9,6 +9,7 @@
#include <string>
#include <utility>
+#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
@@ -38,14 +39,15 @@ class NET_TEST FtpNetworkTransaction : public FtpTransaction {
// FtpTransaction methods:
virtual int Start(const FtpRequestInfo* request_info,
CompletionCallback* callback,
- const BoundNetLog& net_log);
+ const BoundNetLog& net_log) OVERRIDE;
virtual int RestartWithAuth(const string16& username,
const string16& password,
- CompletionCallback* callback);
- virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
- virtual const FtpResponseInfo* GetResponseInfo() const;
- virtual LoadState GetLoadState() const;
- virtual uint64 GetUploadProgress() const;
+ CompletionCallback* callback) OVERRIDE;
+ virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback)
+ OVERRIDE;
+ virtual const FtpResponseInfo* GetResponseInfo() const OVERRIDE;
+ virtual LoadState GetLoadState() const OVERRIDE;
+ virtual uint64 GetUploadProgress() const OVERRIDE;
private:
enum Command {
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 3075a5f..4b929ba 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -6,6 +6,7 @@
#include "build/build_config.h"
+#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -57,7 +58,7 @@ class FtpSocketDataProvider : public DynamicSocketDataProvider {
Init();
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -109,7 +110,7 @@ class FtpSocketDataProvider : public DynamicSocketDataProvider {
return state_;
}
- virtual void Reset() {
+ virtual void Reset() OVERRIDE {
DynamicSocketDataProvider::Reset();
Init();
}
@@ -181,7 +182,7 @@ class FtpSocketDataProviderDirectoryListing : public FtpSocketDataProvider {
FtpSocketDataProviderDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -207,7 +208,7 @@ class FtpSocketDataProviderDirectoryListingWithPasvFallback
FtpSocketDataProviderDirectoryListingWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -233,7 +234,7 @@ class FtpSocketDataProviderDirectoryListingZeroSize
FtpSocketDataProviderDirectoryListingZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -253,7 +254,7 @@ class FtpSocketDataProviderVMSDirectoryListing : public FtpSocketDataProvider {
FtpSocketDataProviderVMSDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -290,7 +291,7 @@ class FtpSocketDataProviderVMSDirectoryListingRootDirectory
FtpSocketDataProviderVMSDirectoryListingRootDirectory() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -329,7 +330,7 @@ class FtpSocketDataProviderFileDownloadWithFileTypecode
FtpSocketDataProviderFileDownloadWithFileTypecode() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -352,7 +353,7 @@ class FtpSocketDataProviderFileDownload : public FtpSocketDataProvider {
FtpSocketDataProviderFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -378,7 +379,7 @@ class FtpSocketDataProviderFileNotFound : public FtpSocketDataProvider {
FtpSocketDataProviderFileNotFound() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -406,7 +407,7 @@ class FtpSocketDataProviderFileDownloadWithPasvFallback
FtpSocketDataProviderFileDownloadWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -431,7 +432,7 @@ class FtpSocketDataProviderFileDownloadZeroSize
FtpSocketDataProviderFileDownloadZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -455,7 +456,7 @@ class FtpSocketDataProviderVMSFileDownload : public FtpSocketDataProvider {
FtpSocketDataProviderVMSFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -493,7 +494,7 @@ class FtpSocketDataProviderEscaping : public FtpSocketDataProviderFileDownload {
FtpSocketDataProviderEscaping() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -521,7 +522,7 @@ class FtpSocketDataProviderFileDownloadTransferStarting
FtpSocketDataProviderFileDownloadTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -545,7 +546,7 @@ class FtpSocketDataProviderDirectoryListingTransferStarting
FtpSocketDataProviderDirectoryListingTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -570,7 +571,7 @@ class FtpSocketDataProviderFileDownloadInvalidResponse
FtpSocketDataProviderFileDownloadInvalidResponse() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -604,7 +605,7 @@ class FtpSocketDataProviderEvilEpsv : public FtpSocketDataProviderFileDownload {
epsv_response_length_(epsv_response_length),
expected_state_(expected_state) {}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -633,7 +634,7 @@ class FtpSocketDataProviderEvilPasv
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -658,7 +659,7 @@ class FtpSocketDataProviderEvilSize : public FtpSocketDataProviderFileDownload {
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -685,7 +686,7 @@ class FtpSocketDataProviderEvilLogin
expected_password_(expected_password) {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {
@@ -712,7 +713,7 @@ class FtpSocketDataProviderCloseConnection : public FtpSocketDataProvider {
FtpSocketDataProviderCloseConnection() {
}
- virtual MockWriteResult OnWrite(const std::string& data) {
+ virtual MockWriteResult OnWrite(const std::string& data) OVERRIDE {
if (InjectFault())
return MockWriteResult(true, data.length());
switch (state()) {