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

Unified Diff: chrome/browser/download/save_page_browsertest.cc

Issue 665253002: Standardize usage of virtual/override/final in chrome/browser/download/ (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 | « chrome/browser/download/save_package_file_picker.h ('k') | chrome/browser/download/test_download_shelf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_page_browsertest.cc
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index b18908031b536ddfdb6d208bb947b1896f5b63f2..db952c527783d096367c2149c6781a40bc62c64e 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -68,7 +68,7 @@ class DownloadPersistedObserver : public DownloadHistory::Observer {
GetDownloadHistory()->AddObserver(this);
}
- virtual ~DownloadPersistedObserver() {
+ ~DownloadPersistedObserver() override {
DownloadService* service = DownloadServiceFactory::GetForBrowserContext(
profile_);
if (service && service->GetDownloadHistory())
@@ -84,8 +84,8 @@ class DownloadPersistedObserver : public DownloadHistory::Observer {
return persisted_;
}
- virtual void OnDownloadStored(DownloadItem* item,
- const history::DownloadRow& info) override {
+ void OnDownloadStored(DownloadItem* item,
+ const history::DownloadRow& info) override {
persisted_ = persisted_ || filter_.Run(item, info);
if (persisted_ && waiting_)
base::MessageLoopForUI::current()->Quit();
@@ -109,7 +109,7 @@ class DownloadRemovedObserver : public DownloadPersistedObserver {
waiting_(false),
download_id_(download_id) {
}
- virtual ~DownloadRemovedObserver() {}
+ ~DownloadRemovedObserver() override {}
bool WaitForRemoved() {
if (removed_)
@@ -120,11 +120,10 @@ class DownloadRemovedObserver : public DownloadPersistedObserver {
return removed_;
}
- virtual void OnDownloadStored(DownloadItem* item,
- const history::DownloadRow& info) override {
- }
+ void OnDownloadStored(DownloadItem* item,
+ const history::DownloadRow& info) override {}
- virtual void OnDownloadsRemoved(const DownloadHistory::IdSet& ids) override {
+ void OnDownloadsRemoved(const DownloadHistory::IdSet& ids) override {
removed_ = ids.find(download_id_) != ids.end();
if (removed_ && waiting_)
base::MessageLoopForUI::current()->Quit();
@@ -188,7 +187,7 @@ class DownloadItemCreatedObserver : public DownloadManager::Observer {
manager->AddObserver(this);
}
- virtual ~DownloadItemCreatedObserver() {
+ ~DownloadItemCreatedObserver() override {
if (manager_)
manager_->RemoveObserver(this);
}
@@ -217,8 +216,8 @@ class DownloadItemCreatedObserver : public DownloadManager::Observer {
private:
// DownloadManager::Observer
- virtual void OnDownloadCreated(
- DownloadManager* manager, DownloadItem* item) override {
+ void OnDownloadCreated(DownloadManager* manager,
+ DownloadItem* item) override {
DCHECK_EQ(manager, manager_);
items_seen_.push_back(item);
@@ -226,7 +225,7 @@ class DownloadItemCreatedObserver : public DownloadManager::Observer {
base::MessageLoopForUI::current()->Quit();
}
- virtual void ManagerGoingDown(DownloadManager* manager) override {
+ void ManagerGoingDown(DownloadManager* manager) override {
manager_->RemoveObserver(this);
manager_ = NULL;
if (waiting_)
@@ -249,17 +248,17 @@ class SavePackageFinishedObserver : public content::DownloadManager::Observer {
download_manager_->AddObserver(this);
}
- virtual ~SavePackageFinishedObserver() {
+ ~SavePackageFinishedObserver() override {
if (download_manager_)
download_manager_->RemoveObserver(this);
}
// DownloadManager::Observer:
- virtual void OnSavePackageSuccessfullyFinished(
- content::DownloadManager* manager, content::DownloadItem* item) override {
+ void OnSavePackageSuccessfullyFinished(content::DownloadManager* manager,
+ content::DownloadItem* item) override {
callback_.Run();
}
- virtual void ManagerGoingDown(content::DownloadManager* manager) override {
+ void ManagerGoingDown(content::DownloadManager* manager) override {
download_manager_->RemoveObserver(this);
download_manager_ = NULL;
}
@@ -283,7 +282,7 @@ class SavePageBrowserTest : public InProcessBrowserTest {
InProcessBrowserTest::SetUp();
}
- virtual void SetUpOnMainThread() override {
+ void SetUpOnMainThread() override {
browser()->profile()->GetPrefs()->SetFilePath(
prefs::kDownloadDefaultDirectory, save_dir_.path());
browser()->profile()->GetPrefs()->SetFilePath(
@@ -443,9 +442,9 @@ class DelayingDownloadManagerDelegate : public ChromeDownloadManagerDelegate {
explicit DelayingDownloadManagerDelegate(Profile* profile)
: ChromeDownloadManagerDelegate(profile) {
}
- virtual ~DelayingDownloadManagerDelegate() {}
+ ~DelayingDownloadManagerDelegate() override {}
- virtual bool ShouldCompleteDownload(
+ bool ShouldCompleteDownload(
content::DownloadItem* item,
const base::Closure& user_complete_callback) override {
return false;
@@ -758,7 +757,7 @@ class SavePageAsMHTMLBrowserTest : public SavePageBrowserTest {
public:
SavePageAsMHTMLBrowserTest() {}
virtual ~SavePageAsMHTMLBrowserTest();
- virtual void SetUpCommandLine(CommandLine* command_line) override {
+ void SetUpCommandLine(CommandLine* command_line) override {
command_line->AppendSwitch(switches::kSavePageAsMHTML);
}
« no previous file with comments | « chrome/browser/download/save_package_file_picker.h ('k') | chrome/browser/download/test_download_shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698