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

Unified Diff: net/url_request/url_fetcher_impl_unittest.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (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
« no previous file with comments | « net/url_request/url_fetcher_impl.h ('k') | net/url_request/url_fetcher_response_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_impl_unittest.cc
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index 5c97366eb3db0d5adb6edead038318ca06090c66..cf52773f562f8844f9b425516fa06c5711a009f4 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -67,12 +67,10 @@ class ThrottlingTestURLRequestContextGetter
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
- return context_;
- }
+ TestURLRequestContext* GetURLRequestContext() override { return context_; }
protected:
- virtual ~ThrottlingTestURLRequestContextGetter() {}
+ ~ThrottlingTestURLRequestContextGetter() override {}
TestURLRequestContext* const context_;
};
@@ -95,7 +93,7 @@ class URLFetcherTest : public testing::Test,
// Subclasses that override this should either call this function or
// CleanupAfterFetchComplete() at the end of their processing, depending on
// whether they want to check for a non-empty HTTP 200 response or not.
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
// Deletes |fetcher| and terminates the message loop.
void CleanupAfterFetchComplete();
@@ -146,10 +144,10 @@ class URLFetcherMockDnsTest : public URLFetcherTest {
virtual void SetUp() override;
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
GURL test_url_;
@@ -231,10 +229,10 @@ namespace {
class URLFetcherPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that does a POST of a file using
@@ -249,10 +247,10 @@ class URLFetcherPostFileTest : public URLFetcherTest {
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath path_;
@@ -264,10 +262,10 @@ class URLFetcherPostFileTest : public URLFetcherTest {
class URLFetcherEmptyPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests download progress reports.
@@ -279,12 +277,12 @@ class URLFetcherDownloadProgressTest : public URLFetcherTest {
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
protected:
// Download progress returned by the previous callback.
@@ -298,13 +296,14 @@ class URLFetcherDownloadProgressTest : public URLFetcherTest {
class URLFetcherDownloadProgressCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
bool cancelled_;
};
@@ -313,12 +312,13 @@ class URLFetcherDownloadProgressCancelTest : public URLFetcherTest {
class URLFetcherUploadProgressTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchUploadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchUploadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
int64 previous_progress_;
std::string chunk_;
@@ -329,14 +329,15 @@ class URLFetcherUploadProgressTest : public URLFetcherTest {
class URLFetcherHeadersTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests SocketAddress.
class URLFetcherSocketAddressTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
protected:
std::string expected_host_;
uint16 expected_port_;
@@ -349,10 +350,10 @@ class URLFetcherStopOnRedirectTest : public URLFetcherTest {
virtual ~URLFetcherStopOnRedirectTest();
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
// The URL we should be redirected to.
@@ -365,10 +366,11 @@ class URLFetcherStopOnRedirectTest : public URLFetcherTest {
class URLFetcherProtectTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -378,10 +380,11 @@ class URLFetcherProtectTest : public URLFetcherTest {
class URLFetcherProtectTestPassedThrough : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -392,7 +395,7 @@ class URLFetcherBadHTTPSTest : public URLFetcherTest {
URLFetcherBadHTTPSTest();
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath cert_dir_;
@@ -402,10 +405,10 @@ class URLFetcherBadHTTPSTest : public URLFetcherTest {
class URLFetcherCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
void CancelRequest();
};
@@ -418,7 +421,7 @@ class CancelTestURLRequestContext : public ThrottlingTestURLRequestContext {
}
private:
- virtual ~CancelTestURLRequestContext() {
+ ~CancelTestURLRequestContext() override {
// The d'tor should execute in the IO thread. Post the quit task to the
// current thread.
base::MessageLoop::current()->PostTask(FROM_HERE,
@@ -439,7 +442,7 @@ class CancelTestURLRequestContextGetter
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
+ TestURLRequestContext* GetURLRequestContext() override {
if (!context_.get()) {
context_.reset(new CancelTestURLRequestContext());
DCHECK(context_->throttler_manager());
@@ -474,7 +477,7 @@ class CancelTestURLRequestContextGetter
}
protected:
- virtual ~CancelTestURLRequestContextGetter() {}
+ ~CancelTestURLRequestContextGetter() override {}
private:
scoped_ptr<TestURLRequestContext> context_;
@@ -487,7 +490,8 @@ class CancelTestURLRequestContextGetter
class URLFetcherMultipleAttemptTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
std::string data_;
};
@@ -501,7 +505,7 @@ class URLFetcherFileTest : public URLFetcherTest {
void CreateFetcherForTempFile(const GURL& url);
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
base::FilePath expected_file_;
« no previous file with comments | « net/url_request/url_fetcher_impl.h ('k') | net/url_request/url_fetcher_response_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698