OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_config.h" | 5 #include "net/proxy/proxy_config.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 const ProxyBypassRules& bypass = proxy_rules_.bypass_rules; | 274 const ProxyBypassRules& bypass = proxy_rules_.bypass_rules; |
275 if (!bypass.rules().empty()) { | 275 if (!bypass.rules().empty()) { |
276 if (proxy_rules_.reverse_bypass) | 276 if (proxy_rules_.reverse_bypass) |
277 dict->SetBoolean("reverse_bypass", true); | 277 dict->SetBoolean("reverse_bypass", true); |
278 | 278 |
279 base::ListValue* list = new base::ListValue(); | 279 base::ListValue* list = new base::ListValue(); |
280 | 280 |
281 for (ProxyBypassRules::RuleList::const_iterator it = | 281 for (ProxyBypassRules::RuleList::const_iterator it = |
282 bypass.rules().begin(); | 282 bypass.rules().begin(); |
283 it != bypass.rules().end(); ++it) { | 283 it != bypass.rules().end(); ++it) { |
284 list->Append(new base::StringValue((*it)->ToString())); | 284 list->AppendString((*it)->ToString()); |
285 } | 285 } |
286 | 286 |
287 dict->Set("bypass_list", list); | 287 dict->Set("bypass_list", list); |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 // Output the source. | 291 // Output the source. |
292 dict->SetString("source", ProxyConfigSourceToString(source_)); | 292 dict->SetString("source", ProxyConfigSourceToString(source_)); |
293 | 293 |
294 return dict; | 294 return dict; |
295 } | 295 } |
296 | 296 |
297 } // namespace net | 297 } // namespace net |
OLD | NEW |