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

Side by Side Diff: chromeos/network/onc/onc_utils.cc

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 unified diff | Download patch
OLDNEW
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 "chromeos/network/onc/onc_utils.h" 5 #include "chromeos/network/onc/onc_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 } 968 }
969 proxy_settings->SetWithoutPathExpansion(::onc::proxy::kManual, 969 proxy_settings->SetWithoutPathExpansion(::onc::proxy::kManual,
970 manual.release()); 970 manual.release());
971 971
972 // Convert the 'bypass_list' string into dictionary entries. 972 // Convert the 'bypass_list' string into dictionary entries.
973 std::string bypass_rules_string; 973 std::string bypass_rules_string;
974 if (proxy_config->GetBypassList(&bypass_rules_string)) { 974 if (proxy_config->GetBypassList(&bypass_rules_string)) {
975 net::ProxyBypassRules bypass_rules; 975 net::ProxyBypassRules bypass_rules;
976 bypass_rules.ParseFromString(bypass_rules_string); 976 bypass_rules.ParseFromString(bypass_rules_string);
977 std::unique_ptr<base::ListValue> exclude_domains(new base::ListValue); 977 std::unique_ptr<base::ListValue> exclude_domains(new base::ListValue);
978 for (const net::ProxyBypassRules::Rule* rule : bypass_rules.rules()) 978 for (const auto& rule : bypass_rules.rules())
979 exclude_domains->AppendString(rule->ToString()); 979 exclude_domains->AppendString(rule->ToString());
980 if (!exclude_domains->empty()) { 980 if (!exclude_domains->empty()) {
981 proxy_settings->SetWithoutPathExpansion(::onc::proxy::kExcludeDomains, 981 proxy_settings->SetWithoutPathExpansion(::onc::proxy::kExcludeDomains,
982 exclude_domains.release()); 982 exclude_domains.release());
983 } 983 }
984 } 984 }
985 break; 985 break;
986 } 986 }
987 default: { 987 default: {
988 LOG(ERROR) << "Unexpected proxy mode in Shill config: " << mode; 988 LOG(ERROR) << "Unexpected proxy mode in Shill config: " << mode;
989 return nullptr; 989 return nullptr;
990 } 990 }
991 } 991 }
992 return proxy_settings; 992 return proxy_settings;
993 } 993 }
994 994
995 } // namespace onc 995 } // namespace onc
996 } // namespace chromeos 996 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/proxy_cros_settings_parser.cc ('k') | net/proxy/mojo_proxy_resolver_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698