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

Unified Diff: net/proxy/proxy_bypass_rules.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/proxy/polling_proxy_config_service.h ('k') | net/proxy/proxy_config_service_fixed.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_bypass_rules.cc
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc
index debb2e8923deafd3228145ff7ccddf6eedba68c7..970e3bbd6c89349b407d7047d659726810a30b47 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -27,7 +27,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
optional_port_(optional_port) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (optional_port_ != -1 && url.EffectiveIntPort() != optional_port_)
return false; // Didn't match port expectation.
@@ -40,7 +40,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
hostname_pattern_);
}
- virtual std::string ToString() const override {
+ std::string ToString() const override {
std::string str;
if (!optional_scheme_.empty())
base::StringAppendF(&str, "%s://", optional_scheme_.c_str());
@@ -50,7 +50,7 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
return str;
}
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new HostnamePatternRule(optional_scheme_,
hostname_pattern_,
optional_port_);
@@ -64,20 +64,16 @@ class HostnamePatternRule : public ProxyBypassRules::Rule {
class BypassLocalRule : public ProxyBypassRules::Rule {
public:
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
const std::string& host = url.host();
if (host == "127.0.0.1" || host == "[::1]")
return true;
return host.find('.') == std::string::npos;
}
- virtual std::string ToString() const override {
- return "<local>";
- }
+ std::string ToString() const override { return "<local>"; }
- virtual Rule* Clone() const override {
- return new BypassLocalRule();
- }
+ Rule* Clone() const override { return new BypassLocalRule(); }
};
// Rule for matching a URL that is an IP address, if that IP address falls
@@ -96,7 +92,7 @@ class BypassIPBlockRule : public ProxyBypassRules::Rule {
prefix_length_in_bits_(prefix_length_in_bits) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (!url.HostIsIPAddress())
return false;
@@ -113,11 +109,9 @@ class BypassIPBlockRule : public ProxyBypassRules::Rule {
prefix_length_in_bits_);
}
- virtual std::string ToString() const override {
- return description_;
- }
+ std::string ToString() const override { return description_; }
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new BypassIPBlockRule(description_,
optional_scheme_,
ip_prefix_,
« no previous file with comments | « net/proxy/polling_proxy_config_service.h ('k') | net/proxy/proxy_config_service_fixed.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698