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

Side by Side Diff: net/proxy/proxy_bypass_rules.cc

Issue 4974001: base: Get rid of 'using' declaration of StringAppendF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_util.cc ('k') | net/tools/flip_server/balsa_headers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/proxy_bypass_rules.h" 5 #include "net/proxy/proxy_bypass_rules.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_tokenizer.h" 8 #include "base/string_tokenizer.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
(...skipping 20 matching lines...) Expand all
31 return false; // Didn't match scheme expectation. 31 return false; // Didn't match scheme expectation.
32 32
33 // Note it is necessary to lower-case the host, since GURL uses capital 33 // Note it is necessary to lower-case the host, since GURL uses capital
34 // letters for percent-escaped characters. 34 // letters for percent-escaped characters.
35 return MatchPattern(StringToLowerASCII(url.host()), hostname_pattern_); 35 return MatchPattern(StringToLowerASCII(url.host()), hostname_pattern_);
36 } 36 }
37 37
38 virtual std::string ToString() const { 38 virtual std::string ToString() const {
39 std::string str; 39 std::string str;
40 if (!optional_scheme_.empty()) 40 if (!optional_scheme_.empty())
41 StringAppendF(&str, "%s://", optional_scheme_.c_str()); 41 base::StringAppendF(&str, "%s://", optional_scheme_.c_str());
42 str += hostname_pattern_; 42 str += hostname_pattern_;
43 if (optional_port_ != -1) 43 if (optional_port_ != -1)
44 StringAppendF(&str, ":%d", optional_port_); 44 base::StringAppendF(&str, ":%d", optional_port_);
45 return str; 45 return str;
46 } 46 }
47 47
48 private: 48 private:
49 const std::string optional_scheme_; 49 const std::string optional_scheme_;
50 const std::string hostname_pattern_; 50 const std::string hostname_pattern_;
51 const int optional_port_; 51 const int optional_port_;
52 }; 52 };
53 53
54 class BypassLocalRule : public ProxyBypassRules::Rule { 54 class BypassLocalRule : public ProxyBypassRules::Rule {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return AddRuleForHostname(scheme, raw, port); 284 return AddRuleForHostname(scheme, raw, port);
285 } 285 }
286 286
287 bool ProxyBypassRules::AddRuleFromStringInternalWithLogging( 287 bool ProxyBypassRules::AddRuleFromStringInternalWithLogging(
288 const std::string& raw, 288 const std::string& raw,
289 bool use_hostname_suffix_matching) { 289 bool use_hostname_suffix_matching) {
290 return AddRuleFromStringInternal(raw, use_hostname_suffix_matching); 290 return AddRuleFromStringInternal(raw, use_hostname_suffix_matching);
291 } 291 }
292 292
293 } // namespace net 293 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_util.cc ('k') | net/tools/flip_server/balsa_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698