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

Unified Diff: net/proxy/proxy_bypass_rules.h

Issue 2391453002: Remove stl_util's deletion functions from net/proxy/. (Closed)
Patch Set: fixes Created 4 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/mojo_proxy_resolver_impl.cc ('k') | net/proxy/proxy_bypass_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_bypass_rules.h
diff --git a/net/proxy/proxy_bypass_rules.h b/net/proxy/proxy_bypass_rules.h
index c7960743f81a226f6df3ad7624425d49ed5bd8e6..5bedcc813e7ce5072bf8b6ad1c168c67664893e9 100644
--- a/net/proxy/proxy_bypass_rules.h
+++ b/net/proxy/proxy_bypass_rules.h
@@ -5,6 +5,7 @@
#ifndef NET_PROXY_PROXY_BYPASS_RULES_H_
#define NET_PROXY_PROXY_BYPASS_RULES_H_
+#include <memory>
#include <string>
#include <vector>
@@ -32,8 +33,8 @@ class NET_EXPORT ProxyBypassRules {
// visualizing the rules, and also to test equality of a rules list.
virtual std::string ToString() const = 0;
- // Creates a copy of this rule. (Caller is responsible for deleting it)
- virtual Rule* Clone() const = 0;
+ // Creates a copy of this rule.
+ virtual std::unique_ptr<Rule> Clone() const = 0;
bool Equals(const Rule& rule) const;
@@ -41,7 +42,7 @@ class NET_EXPORT ProxyBypassRules {
DISALLOW_COPY_AND_ASSIGN(Rule);
};
- typedef std::vector<const Rule*> RuleList;
+ typedef std::vector<std::unique_ptr<Rule>> RuleList;
// Note: This class supports copy constructor and assignment.
ProxyBypassRules();
@@ -69,7 +70,7 @@ class NET_EXPORT ProxyBypassRules {
// This is a variant of ParseFromString, which interprets hostname patterns
// as suffix tests rather than hostname tests (so "google.com" would actually
// match "*google.com"). This is only currently used for the linux no_proxy
- // evironment variable. It is less flexible, since with the suffix matching
+ // environment variable. It is less flexible, since with the suffix matching
// format you can't match an individual host.
// NOTE: Use ParseFromString() unless you truly need this behavior.
void ParseFromStringUsingSuffixMatching(const std::string& raw);
« no previous file with comments | « net/proxy/mojo_proxy_resolver_impl.cc ('k') | net/proxy/proxy_bypass_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698