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

Side by Side Diff: net/proxy/proxy_service.cc

Issue 113482: Adding the ability to alter Chrome's proxy settings via the automation interf... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/proxy/proxy_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 if (it != pending_requests_.end()) { 531 if (it != pending_requests_.end()) {
532 pending_requests_.erase(it); 532 pending_requests_.erase(it);
533 } 533 }
534 } 534 }
535 535
536 void ProxyService::SetProxyScriptFetcher( 536 void ProxyService::SetProxyScriptFetcher(
537 ProxyScriptFetcher* proxy_script_fetcher) { 537 ProxyScriptFetcher* proxy_script_fetcher) {
538 proxy_script_fetcher_.reset(proxy_script_fetcher); 538 proxy_script_fetcher_.reset(proxy_script_fetcher);
539 } 539 }
540 540
541 void ProxyService::ResetConfigService(
542 ProxyConfigService* new_proxy_config_service) {
543 config_service_.reset(new_proxy_config_service);
544 UpdateConfig();
545 }
546
541 void ProxyService::DidCompletePacRequest(int config_id, int result_code) { 547 void ProxyService::DidCompletePacRequest(int config_id, int result_code) {
542 // If we get an error that indicates a bad PAC config, then we should 548 // If we get an error that indicates a bad PAC config, then we should
543 // remember that, and not try the PAC config again for a while. 549 // remember that, and not try the PAC config again for a while.
544 550
545 // Our config may have already changed. 551 // Our config may have already changed.
546 if (result_code == OK || config_id != config_.id()) 552 if (result_code == OK || config_id != config_.id())
547 return; 553 return;
548 554
549 // Remember that this configuration doesn't work. 555 // Remember that this configuration doesn't work.
550 config_is_bad_ = true; 556 config_is_bad_ = true;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 OnCompletion(result_); 726 OnCompletion(result_);
721 } 727 }
722 } 728 }
723 729
724 void SyncProxyServiceHelper::OnCompletion(int rv) { 730 void SyncProxyServiceHelper::OnCompletion(int rv) {
725 result_ = rv; 731 result_ = rv;
726 event_.Signal(); 732 event_.Signal();
727 } 733 }
728 734
729 } // namespace net 735 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698