| OLD | NEW |
| 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 Loading... |
| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 | 962 |
| 959 void AutomationProvider::SaveAsAsync(int tab_handle) { | 963 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 960 NavigationController* tab = NULL; | 964 NavigationController* tab = NULL; |
| 961 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 965 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 962 if (tab_contents) { | 966 if (tab_contents) { |
| 963 TabContentsWrapper* wrapper = | 967 TabContentsWrapper* wrapper = |
| 964 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents); | 968 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents); |
| 965 wrapper->download_tab_helper()->OnSavePage(); | 969 wrapper->download_tab_helper()->OnSavePage(); |
| 966 } | 970 } |
| 967 } | 971 } |
| OLD | NEW |