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

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

Issue 14846004: Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 7 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 | Annotate | Revision Log
« chromeos/network/network_state.h ('K') | « net/proxy/proxy_config.h ('k') | no next file » | 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) 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/strings/string_tokenizer.h" 9 #include "base/strings/string_tokenizer.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 bool ProxyConfig::HasAutomaticSettings() const { 212 bool ProxyConfig::HasAutomaticSettings() const {
213 return auto_detect_ || has_pac_url(); 213 return auto_detect_ || has_pac_url();
214 } 214 }
215 215
216 void ProxyConfig::ClearAutomaticSettings() { 216 void ProxyConfig::ClearAutomaticSettings() {
217 auto_detect_ = false; 217 auto_detect_ = false;
218 pac_url_ = GURL(); 218 pac_url_ = GURL();
219 } 219 }
220 220
221 base::Value* ProxyConfig::ToValue() const { 221 base::DictionaryValue* ProxyConfig::ToValue() const {
222 base::DictionaryValue* dict = new base::DictionaryValue(); 222 base::DictionaryValue* dict = new base::DictionaryValue();
223 223
224 // Output the automatic settings. 224 // Output the automatic settings.
225 if (auto_detect_) 225 if (auto_detect_)
226 dict->SetBoolean("auto_detect", auto_detect_); 226 dict->SetBoolean("auto_detect", auto_detect_);
227 if (has_pac_url()) { 227 if (has_pac_url()) {
228 dict->SetString("pac_url", pac_url_.possibly_invalid_spec()); 228 dict->SetString("pac_url", pac_url_.possibly_invalid_spec());
229 if (pac_mandatory_) 229 if (pac_mandatory_)
230 dict->SetBoolean("pac_mandatory", pac_mandatory_); 230 dict->SetBoolean("pac_mandatory", pac_mandatory_);
231 } 231 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 } 269 }
270 270
271 // Output the source. 271 // Output the source.
272 dict->SetString("source", ProxyConfigSourceToString(source_)); 272 dict->SetString("source", ProxyConfigSourceToString(source_));
273 273
274 return dict; 274 return dict;
275 } 275 }
276 276
277 } // namespace net 277 } // namespace net
OLDNEW
« chromeos/network/network_state.h ('K') | « net/proxy/proxy_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698