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

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: Addressed comments 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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 case ProxyPrefs::MODE_DIRECT: 676 case ProxyPrefs::MODE_DIRECT:
677 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect()); 677 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateDirect());
678 break; 678 break;
679 case ProxyPrefs::MODE_AUTO_DETECT: 679 case ProxyPrefs::MODE_AUTO_DETECT:
680 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect()); 680 prefs_.SetValue(prefs::kProxy, ProxyConfigDictionary::CreateAutoDetect());
681 break; 681 break;
682 case ProxyPrefs::MODE_PAC_SCRIPT: { 682 case ProxyPrefs::MODE_PAC_SCRIPT: {
683 std::string pac_url; 683 std::string pac_url;
684 proxy_policies_[kPolicyProxyPacUrl]->GetAsString(&pac_url); 684 proxy_policies_[kPolicyProxyPacUrl]->GetAsString(&pac_url);
685 prefs_.SetValue(prefs::kProxy, 685 prefs_.SetValue(prefs::kProxy,
686 ProxyConfigDictionary::CreatePacScript(pac_url)); 686 ProxyConfigDictionary::CreatePacScript(pac_url, false));
687 break; 687 break;
688 } 688 }
689 case ProxyPrefs::MODE_FIXED_SERVERS: { 689 case ProxyPrefs::MODE_FIXED_SERVERS: {
690 std::string proxy_server; 690 std::string proxy_server;
691 proxy_policies_[kPolicyProxyServer]->GetAsString(&proxy_server); 691 proxy_policies_[kPolicyProxyServer]->GetAsString(&proxy_server);
692 std::string bypass_list; 692 std::string bypass_list;
693 if (HasProxyPolicy(kPolicyProxyBypassList)) 693 if (HasProxyPolicy(kPolicyProxyBypassList))
694 proxy_policies_[kPolicyProxyBypassList]->GetAsString(&bypass_list); 694 proxy_policies_[kPolicyProxyBypassList]->GetAsString(&bypass_list);
695 prefs_.SetValue(prefs::kProxy, 695 prefs_.SetValue(prefs::kProxy,
696 ProxyConfigDictionary::CreateFixedServers(proxy_server, 696 ProxyConfigDictionary::CreateFixedServers(proxy_server,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 // Update the initialization flag. 999 // Update the initialization flag.
1000 if (!initialization_complete_ && 1000 if (!initialization_complete_ &&
1001 provider_->IsInitializationComplete()) { 1001 provider_->IsInitializationComplete()) {
1002 initialization_complete_ = true; 1002 initialization_complete_ = true;
1003 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, 1003 FOR_EACH_OBSERVER(PrefStore::Observer, observers_,
1004 OnInitializationCompleted()); 1004 OnInitializationCompleted());
1005 } 1005 }
1006 } 1006 }
1007 1007
1008 } // namespace policy 1008 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698