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

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

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_list.h" 5 #include "net/proxy/proxy_list.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_tokenizer.h" 8 #include "base/string_tokenizer.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "net/proxy/proxy_server.h"
10 11
11 using base::TimeDelta; 12 using base::TimeDelta;
12 using base::TimeTicks; 13 using base::TimeTicks;
13 14
14 namespace net { 15 namespace net {
15 16
17 ProxyList::ProxyList() {
18 }
19
20 ProxyList::~ProxyList() {
21 }
22
16 void ProxyList::Set(const std::string& proxy_uri_list) { 23 void ProxyList::Set(const std::string& proxy_uri_list) {
17 proxies_.clear(); 24 proxies_.clear();
18 StringTokenizer str_tok(proxy_uri_list, ";"); 25 StringTokenizer str_tok(proxy_uri_list, ";");
19 while (str_tok.GetNext()) { 26 while (str_tok.GetNext()) {
20 ProxyServer uri = ProxyServer::FromURI( 27 ProxyServer uri = ProxyServer::FromURI(
21 str_tok.token_begin(), str_tok.token_end(), ProxyServer::SCHEME_HTTP); 28 str_tok.token_begin(), str_tok.token_end(), ProxyServer::SCHEME_HTTP);
22 // Silently discard malformed inputs. 29 // Silently discard malformed inputs.
23 if (uri.is_valid()) 30 if (uri.is_valid())
24 proxies_.push_back(uri); 31 proxies_.push_back(uri);
25 } 32 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 154 }
148 } 155 }
149 156
150 // Remove this proxy from our list. 157 // Remove this proxy from our list.
151 proxies_.erase(proxies_.begin()); 158 proxies_.erase(proxies_.begin());
152 159
153 return !proxies_.empty(); 160 return !proxies_.empty();
154 } 161 }
155 162
156 } // namespace net 163 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698