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

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store.cc

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: Created 9 years, 8 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 #include "chrome/browser/policy/configuration_policy_pref_store.h" 5 #include "chrome/browser/policy/configuration_policy_pref_store.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 case ProxyPrefs::MODE_DIRECT: 672 case ProxyPrefs::MODE_DIRECT:
673 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect()); 673 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect());
674 break; 674 break;
675 case ProxyPrefs::MODE_AUTO_DETECT: 675 case ProxyPrefs::MODE_AUTO_DETECT:
676 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect()); 676 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect());
677 break; 677 break;
678 case ProxyPrefs::MODE_PAC_SCRIPT: { 678 case ProxyPrefs::MODE_PAC_SCRIPT: {
679 std::string pac_url; 679 std::string pac_url;
680 proxy_policies_[kPolicyProxyPacUrl]->GetAsString(&pac_url); 680 proxy_policies_[kPolicyProxyPacUrl]->GetAsString(&pac_url);
681 prefs_.SetValue(prefs::kProxy, 681 prefs_.SetValue(prefs::kProxy,
682 ProxyConfigDictionary::CreatePacScript(pac_url)); 682 ProxyConfigDictionary::CreatePacScript(pac_url, false));
683 break; 683 break;
684 } 684 }
685 case ProxyPrefs::MODE_FIXED_SERVERS: { 685 case ProxyPrefs::MODE_FIXED_SERVERS: {
686 std::string proxy_server; 686 std::string proxy_server;
687 proxy_policies_[kPolicyProxyServer]->GetAsString(&proxy_server); 687 proxy_policies_[kPolicyProxyServer]->GetAsString(&proxy_server);
688 std::string bypass_list; 688 std::string bypass_list;
689 if (HasProxyPolicy(kPolicyProxyBypassList)) 689 if (HasProxyPolicy(kPolicyProxyBypassList))
690 proxy_policies_[kPolicyProxyBypassList]->GetAsString(&bypass_list); 690 proxy_policies_[kPolicyProxyBypassList]->GetAsString(&bypass_list);
691 prefs_.SetValue(prefs::kProxy, 691 prefs_.SetValue(prefs::kProxy,
692 ProxyConfigDictionary::CreateFixedServers(proxy_server, 692 ProxyConfigDictionary::CreateFixedServers(proxy_server,
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 // Update the initialization flag. 992 // Update the initialization flag.
993 if (!initialization_complete_ && 993 if (!initialization_complete_ &&
994 provider_->IsInitializationComplete()) { 994 provider_->IsInitializationComplete()) {
995 initialization_complete_ = true; 995 initialization_complete_ = true;
996 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, 996 FOR_EACH_OBSERVER(PrefStore::Observer, observers_,
997 OnInitializationCompleted()); 997 OnInitializationCompleted());
998 } 998 }
999 } 999 }
1000 1000
1001 } // namespace policy 1001 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698