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

Side by Side Diff: chrome/browser/prefs/proxy_config_dictionary.h

Issue 6871019: Enable (optional) blocking of webrequests in case a PAC script cannot be fetched or is invalid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ 5 #ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
6 #define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ 6 #define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 13 matching lines...) Expand all
24 // } 24 // }
25 // See proxy_config_dictionary.cc for the structure of the respective strings. 25 // See proxy_config_dictionary.cc for the structure of the respective strings.
26 class ProxyConfigDictionary { 26 class ProxyConfigDictionary {
27 public: 27 public:
28 // Creates a deep copy of |dict| and leaves ownership to caller. 28 // Creates a deep copy of |dict| and leaves ownership to caller.
29 explicit ProxyConfigDictionary(const DictionaryValue* dict); 29 explicit ProxyConfigDictionary(const DictionaryValue* dict);
30 ~ProxyConfigDictionary(); 30 ~ProxyConfigDictionary();
31 31
32 bool GetMode(ProxyPrefs::ProxyMode* out) const; 32 bool GetMode(ProxyPrefs::ProxyMode* out) const;
33 bool GetPacUrl(std::string* out) const; 33 bool GetPacUrl(std::string* out) const;
34 bool GetPacMandatory(bool* out) const;
34 bool GetProxyServer(std::string* out) const; 35 bool GetProxyServer(std::string* out) const;
35 bool GetBypassList(std::string* out) const; 36 bool GetBypassList(std::string* out) const;
36 bool HasBypassList() const; 37 bool HasBypassList() const;
37 38
38 static DictionaryValue* CreateDirect(); 39 static DictionaryValue* CreateDirect();
39 static DictionaryValue* CreateAutoDetect(); 40 static DictionaryValue* CreateAutoDetect();
40 static DictionaryValue* CreatePacScript(const std::string& pac_url); 41 static DictionaryValue* CreatePacScript(const std::string& pac_url,
42 bool pac_mandatory);
41 static DictionaryValue* CreateFixedServers( 43 static DictionaryValue* CreateFixedServers(
42 const std::string& proxy_server, 44 const std::string& proxy_server,
43 const std::string& bypass_list); 45 const std::string& bypass_list);
44 static DictionaryValue* CreateSystem(); 46 static DictionaryValue* CreateSystem();
45 private: 47 private:
46 static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode, 48 static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode,
47 const std::string& pac_url, 49 const std::string& pac_url,
50 bool pac_mandatory,
48 const std::string& proxy_server, 51 const std::string& proxy_server,
49 const std::string& bypass_list); 52 const std::string& bypass_list);
50 53
51 scoped_ptr<DictionaryValue> dict_; 54 scoped_ptr<DictionaryValue> dict_;
52 55
53 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); 56 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary);
54 }; 57 };
55 58
56 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ 59 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/prefs/proxy_config_dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698