summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 17:24:40 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 17:24:40 +0000
commitaacc8f19737f981d40ee989fe7f25ac16d38c640 (patch)
tree95d2bdb35a1b0ecc384326b0da248f5f72b79d33 /net
parent8d40e31d9ec3466d55580189285b60b2a619924a (diff)
downloadchromium_src-aacc8f19737f981d40ee989fe7f25ac16d38c640.zip
chromium_src-aacc8f19737f981d40ee989fe7f25ac16d38c640.tar.gz
chromium_src-aacc8f19737f981d40ee989fe7f25ac16d38c640.tar.bz2
Address a couple of nits in comment wording.
BUG=NONE Review URL: http://codereview.chromium.org/2830022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/proxy/proxy_info.h12
-rw-r--r--net/proxy/proxy_list.h3
-rw-r--r--net/proxy/proxy_server.cc1
-rw-r--r--net/proxy/proxy_server.h9
4 files changed, 13 insertions, 12 deletions
diff --git a/net/proxy/proxy_info.h b/net/proxy/proxy_info.h
index 5555108..ec5d05a 100644
--- a/net/proxy/proxy_info.h
+++ b/net/proxy/proxy_info.h
@@ -22,22 +22,22 @@ class ProxyInfo {
ProxyInfo();
// Default copy-constructor and assignment operator are OK!
- // Use the same proxy server as the given |proxy_info|.
+ // Uses the same proxy server as the given |proxy_info|.
void Use(const ProxyInfo& proxy_info);
- // Use a direct connection.
+ // Uses a direct connection.
void UseDirect();
- // Use a specific proxy server, of the form:
+ // Uses a specific proxy server, of the form:
// proxy-uri = [<scheme> "://"] <hostname> [":" <port>]
// This may optionally be a semi-colon delimited list of <proxy-uri>.
// It is OK to have LWS between entries.
void UseNamedProxy(const std::string& proxy_uri_list);
- // Set the proxy list to a single entry, |proxy_server|.
+ // Sets the proxy list to a single entry, |proxy_server|.
void UseProxyServer(const ProxyServer& proxy_server);
- // Parse from the given PAC result.
+ // Parses from the given PAC result.
void UsePacString(const std::string& pac_string) {
proxy_list_.SetFromPacString(pac_string);
}
@@ -88,7 +88,7 @@ class ProxyInfo {
proxy_list_.DeprioritizeBadProxies(proxy_retry_info);
}
- // Delete any entry which doesn't have one of the specified proxy schemes.
+ // Deletes any entry which doesn't have one of the specified proxy schemes.
void RemoveProxiesWithoutScheme(int scheme_bit_field) {
proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field);
}
diff --git a/net/proxy/proxy_list.h b/net/proxy/proxy_list.h
index 1afd1d9..5df1e0a09 100644
--- a/net/proxy/proxy_list.h
+++ b/net/proxy/proxy_list.h
@@ -40,11 +40,12 @@ class ProxyList {
// this if !IsEmpty().
const ProxyServer& Get() const;
- // Set the list by parsing the pac result |pac_string|.
+ // Sets the list by parsing the pac result |pac_string|.
// Some examples for |pac_string|:
// "DIRECT"
// "PROXY foopy1"
// "PROXY foopy1; SOCKS4 foopy2:1188"
+ // Does a best-effort parse, and silently discards any errors.
void SetFromPacString(const std::string& pac_string);
// Returns a PAC-style semicolon-separated list of valid proxy servers.
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc
index 4903880..ba45ff2 100644
--- a/net/proxy/proxy_server.cc
+++ b/net/proxy/proxy_server.cc
@@ -144,6 +144,7 @@ ProxyServer ProxyServer::FromPacString(const std::string& pac_string) {
return FromPacString(pac_string.begin(), pac_string.end());
}
+// static
ProxyServer ProxyServer::FromPacString(std::string::const_iterator begin,
std::string::const_iterator end) {
// Trim the leading/trailing whitespace.
diff --git a/net/proxy/proxy_server.h b/net/proxy/proxy_server.h
index d7a94f0..6992e3e 100644
--- a/net/proxy/proxy_server.h
+++ b/net/proxy/proxy_server.h
@@ -73,7 +73,7 @@ class ProxyServer {
// |port_| here.
HostPortPair host_port_pair() const;
- // Parse from an input with format:
+ // Parses from an input with format:
// [<scheme>"://"]<server>[":"<port>]
//
// Both <scheme> and <port> are optional. If <scheme> is omitted, it will be
@@ -94,7 +94,7 @@ class ProxyServer {
std::string::const_iterator uri_end,
Scheme default_scheme);
- // Format as a URI string. This does the reverse of FromURI.
+ // Formats as a URI string. This does the reverse of FromURI.
std::string ToURI() const;
// Parses from a PAC string result.
@@ -130,8 +130,7 @@ class ProxyServer {
CFStringRef port_key);
#endif
-
- // Format as a PAC result entry. This does the reverse of FromPacString().
+ // Formats as a PAC result entry. This does the reverse of FromPacString().
std::string ToPacString() const;
// Returns the default port number for a proxy server with the specified
@@ -145,7 +144,7 @@ class ProxyServer {
}
private:
- // Create a ProxyServer given a scheme, and host/port string. If parsing the
+ // Creates a ProxyServer given a scheme, and host/port string. If parsing the
// host/port string fails, the returned instance will be invalid.
static ProxyServer FromSchemeHostAndPort(
Scheme scheme,