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

Side by Side Diff: chrome/browser/automation/automation_provider.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, 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_preference_api.h » ('j') | 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) 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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 return; 543 return;
544 } 544 }
545 bool auto_config; 545 bool auto_config;
546 if (dict.GetBoolean(automation::kJSONProxyAutoconfig, &auto_config)) { 546 if (dict.GetBoolean(automation::kJSONProxyAutoconfig, &auto_config)) {
547 pc->set_auto_detect(true); 547 pc->set_auto_detect(true);
548 } 548 }
549 std::string pac_url; 549 std::string pac_url;
550 if (dict.GetString(automation::kJSONProxyPacUrl, &pac_url)) { 550 if (dict.GetString(automation::kJSONProxyPacUrl, &pac_url)) {
551 pc->set_pac_url(GURL(pac_url)); 551 pc->set_pac_url(GURL(pac_url));
552 } 552 }
553 bool pac_mandatory;
554 if (dict.GetBoolean(automation::kJSONProxyPacMandatory, &pac_mandatory)) {
555 pc->set_pac_mandatory(pac_mandatory);
556 }
553 std::string proxy_bypass_list; 557 std::string proxy_bypass_list;
554 if (dict.GetString(automation::kJSONProxyBypassList, &proxy_bypass_list)) { 558 if (dict.GetString(automation::kJSONProxyBypassList, &proxy_bypass_list)) {
555 pc->proxy_rules().bypass_rules.ParseFromString(proxy_bypass_list); 559 pc->proxy_rules().bypass_rules.ParseFromString(proxy_bypass_list);
556 } 560 }
557 std::string proxy_server; 561 std::string proxy_server;
558 if (dict.GetString(automation::kJSONProxyServer, &proxy_server)) { 562 if (dict.GetString(automation::kJSONProxyServer, &proxy_server)) {
559 pc->proxy_rules().ParseFromString(proxy_server); 563 pc->proxy_rules().ParseFromString(proxy_server);
560 } 564 }
561 } 565 }
562 566
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 963
960 void AutomationProvider::SaveAsAsync(int tab_handle) { 964 void AutomationProvider::SaveAsAsync(int tab_handle) {
961 NavigationController* tab = NULL; 965 NavigationController* tab = NULL;
962 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); 966 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab);
963 if (tab_contents) { 967 if (tab_contents) {
964 TabContentsWrapper* wrapper = 968 TabContentsWrapper* wrapper =
965 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents); 969 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
966 wrapper->download_tab_helper()->OnSavePage(); 970 wrapper->download_tab_helper()->OnSavePage();
967 } 971 }
968 } 972 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_preference_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698