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

Unified Diff: components/query_parser/query_parser.cc

Issue 666133002: Standardize usage of virtual/override/final in components/ (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: components/query_parser/query_parser.cc
diff --git a/components/query_parser/query_parser.cc b/components/query_parser/query_parser.cc
index 10703f042d5c46facc91497a1d21675f07d5dab7..96c73c2de5e9f719366cc98952b669c350ce54b5 100644
--- a/components/query_parser/query_parser.cc
+++ b/components/query_parser/query_parser.cc
@@ -67,22 +67,20 @@ bool IsQueryQuote(wchar_t ch) {
class QueryNodeWord : public QueryNode {
public:
explicit QueryNodeWord(const base::string16& word);
- virtual ~QueryNodeWord();
+ ~QueryNodeWord() override;
const base::string16& word() const { return word_; }
void set_literal(bool literal) { literal_ = literal; }
// QueryNode:
- virtual int AppendToSQLiteQuery(base::string16* query) const override;
- virtual bool IsWord() const override;
- virtual bool Matches(const base::string16& word, bool exact) const override;
- virtual bool HasMatchIn(
- const QueryWordVector& words,
- Snippet::MatchPositions* match_positions) const override;
- virtual bool HasMatchIn(
- const QueryWordVector& words) const override;
- virtual void AppendWords(std::vector<base::string16>* words) const override;
+ int AppendToSQLiteQuery(base::string16* query) const override;
+ bool IsWord() const override;
+ bool Matches(const base::string16& word, bool exact) const override;
+ bool HasMatchIn(const QueryWordVector& words,
+ Snippet::MatchPositions* match_positions) const override;
+ bool HasMatchIn(const QueryWordVector& words) const override;
+ void AppendWords(std::vector<base::string16>* words) const override;
private:
base::string16 word_;
@@ -148,7 +146,7 @@ void QueryNodeWord::AppendWords(std::vector<base::string16>* words) const {
class QueryNodeList : public QueryNode {
public:
QueryNodeList();
- virtual ~QueryNodeList();
+ ~QueryNodeList() override;
QueryNodeStarVector* children() { return &children_; }
@@ -158,14 +156,13 @@ class QueryNodeList : public QueryNode {
void RemoveEmptySubnodes();
// QueryNode:
- virtual int AppendToSQLiteQuery(base::string16* query) const override;
- virtual bool IsWord() const override;
- virtual bool Matches(const base::string16& word, bool exact) const override;
- virtual bool HasMatchIn(
- const QueryWordVector& words,
- Snippet::MatchPositions* match_positions) const override;
- virtual bool HasMatchIn(const QueryWordVector& words) const override;
- virtual void AppendWords(std::vector<base::string16>* words) const override;
+ int AppendToSQLiteQuery(base::string16* query) const override;
+ bool IsWord() const override;
+ bool Matches(const base::string16& word, bool exact) const override;
+ bool HasMatchIn(const QueryWordVector& words,
+ Snippet::MatchPositions* match_positions) const override;
+ bool HasMatchIn(const QueryWordVector& words) const override;
+ void AppendWords(std::vector<base::string16>* words) const override;
protected:
int AppendChildrenToString(base::string16* query) const;
@@ -245,14 +242,13 @@ int QueryNodeList::AppendChildrenToString(base::string16* query) const {
class QueryNodePhrase : public QueryNodeList {
public:
QueryNodePhrase();
- virtual ~QueryNodePhrase();
+ ~QueryNodePhrase() override;
// QueryNodeList:
- virtual int AppendToSQLiteQuery(base::string16* query) const override;
- virtual bool HasMatchIn(
- const QueryWordVector& words,
- Snippet::MatchPositions* match_positions) const override;
- virtual bool HasMatchIn(const QueryWordVector& words) const override;
+ int AppendToSQLiteQuery(base::string16* query) const override;
+ bool HasMatchIn(const QueryWordVector& words,
+ Snippet::MatchPositions* match_positions) const override;
+ bool HasMatchIn(const QueryWordVector& words) const override;
private:
bool MatchesAll(const QueryWordVector& words,
« no previous file with comments | « components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc ('k') | components/rappor/byte_vector_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698