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

Unified Diff: chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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/ui/webui/ntp/suggestions_combiner_unittest.cc
diff --git a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
index 236483a48584cadbb7d6ecf1bfbced526a304b6c..1a14aaf2e0024347e9e770ef8cc63d7402c7aa66 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
@@ -142,9 +142,7 @@ class SuggestionsSourceStub : public SuggestionsSource {
number_of_suggestions_(number_of_suggestions),
debug_(false) {
}
- virtual ~SuggestionsSourceStub() {
- STLDeleteElements(&items_);
- }
+ ~SuggestionsSourceStub() override { STLDeleteElements(&items_); }
// Call this method to simulate that the SuggestionsSource has received all
// its suggestions.
@@ -154,16 +152,10 @@ class SuggestionsSourceStub : public SuggestionsSource {
private:
// SuggestionsSource Override and implementation.
- virtual void SetDebug(bool enable) override {
- debug_ = enable;
- }
- virtual int GetWeight() override {
- return weight_;
- }
- virtual int GetItemCount() override {
- return items_.size();
- }
- virtual base::DictionaryValue* PopItem() override {
+ void SetDebug(bool enable) override { debug_ = enable; }
+ int GetWeight() override { return weight_; }
+ int GetItemCount() override { return items_.size(); }
+ base::DictionaryValue* PopItem() override {
if (items_.empty())
return NULL;
base::DictionaryValue* item = items_.front();
@@ -171,7 +163,7 @@ class SuggestionsSourceStub : public SuggestionsSource {
return item;
}
- virtual void FetchItems(Profile* profile) override {
+ void FetchItems(Profile* profile) override {
char num_str[21]; // Enough to hold all numbers up to 64-bits.
for (int i = 0; i < number_of_suggestions_; ++i) {
base::snprintf(num_str, sizeof(num_str), "%d", i);
@@ -187,7 +179,7 @@ class SuggestionsSourceStub : public SuggestionsSource {
items_.push_back(item);
}
- virtual void SetCombiner(SuggestionsCombiner* combiner) override {
+ void SetCombiner(SuggestionsCombiner* combiner) override {
DCHECK(!combiner_);
combiner_ = combiner;
}

Powered by Google App Engine
This is Rietveld 408576698