| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/net/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/privacy_blacklist/blacklist.h" | 10 #include "chrome/browser/privacy_blacklist/blacklist.h" |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 639 |
| 640 ChromeURLRequestContext::ChromeURLRequestContext() { | 640 ChromeURLRequestContext::ChromeURLRequestContext() { |
| 641 CheckCurrentlyOnIOThread(); | 641 CheckCurrentlyOnIOThread(); |
| 642 } | 642 } |
| 643 | 643 |
| 644 ChromeURLRequestContext::~ChromeURLRequestContext() { | 644 ChromeURLRequestContext::~ChromeURLRequestContext() { |
| 645 CheckCurrentlyOnIOThread(); | 645 CheckCurrentlyOnIOThread(); |
| 646 if (appcache_service_.get() && appcache_service_->request_context() == this) | 646 if (appcache_service_.get() && appcache_service_->request_context() == this) |
| 647 appcache_service_->set_request_context(NULL); | 647 appcache_service_->set_request_context(NULL); |
| 648 | 648 |
| 649 #if defined(OS_LINUX) |
| 650 if (this == net::GetURLRequestContextForOCSP()) { |
| 651 // We are releasing the URLRequestContext used by OCSP handlers. |
| 652 net::SetURLRequestContextForOCSP(NULL); |
| 653 } |
| 654 #endif |
| 655 |
| 649 NotificationService::current()->Notify( | 656 NotificationService::current()->Notify( |
| 650 NotificationType::URL_REQUEST_CONTEXT_RELEASED, | 657 NotificationType::URL_REQUEST_CONTEXT_RELEASED, |
| 651 Source<URLRequestContext>(this), | 658 Source<URLRequestContext>(this), |
| 652 NotificationService::NoDetails()); | 659 NotificationService::NoDetails()); |
| 653 | 660 |
| 654 delete ftp_transaction_factory_; | 661 delete ftp_transaction_factory_; |
| 655 delete http_transaction_factory_; | 662 delete http_transaction_factory_; |
| 656 } | 663 } |
| 657 | 664 |
| 658 FilePath ChromeURLRequestContext::GetPathForExtension(const std::string& id) { | 665 FilePath ChromeURLRequestContext::GetPathForExtension(const std::string& id) { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 } | 915 } |
| 909 | 916 |
| 910 if (command_line.HasSwitch(switches::kProxyBypassList)) { | 917 if (command_line.HasSwitch(switches::kProxyBypassList)) { |
| 911 proxy_config->ParseNoProxyList( | 918 proxy_config->ParseNoProxyList( |
| 912 WideToASCII(command_line.GetSwitchValue( | 919 WideToASCII(command_line.GetSwitchValue( |
| 913 switches::kProxyBypassList))); | 920 switches::kProxyBypassList))); |
| 914 } | 921 } |
| 915 | 922 |
| 916 return proxy_config; | 923 return proxy_config; |
| 917 } | 924 } |
| OLD | NEW |