| 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/net/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/io_thread.h" | 10 #include "chrome/browser/io_thread.h" |
| 11 #include "chrome/browser/net/chrome_cookie_policy.h" | 11 #include "chrome/browser/net/chrome_cookie_policy.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_io_data.h" | 13 #include "chrome/browser/profiles/profile_io_data.h" |
| 14 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 14 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "content/browser/browser_thread.h" | 16 #include "content/browser/browser_thread.h" |
| 17 #include "content/common/notification_service.h" | 17 #include "content/common/notification_service.h" |
| 18 #include "net/base/cookie_store.h" | 18 #include "net/base/cookie_store.h" |
| 19 #include "net/ftp/ftp_transaction_factory.h" | 19 #include "net/ftp/ftp_transaction_factory.h" |
| 20 #include "net/http/http_transaction_factory.h" | 20 #include "net/http/http_transaction_factory.h" |
| 21 #include "net/http/http_util.h" | 21 #include "net/http/http_util.h" |
| 22 #include "webkit/glue/webkit_glue.h" | 22 #include "webkit/glue/webkit_glue.h" |
| 23 | 23 |
| 24 #if defined(USE_NSS) | 24 #if defined(USE_NSS) |
| 25 #include "net/ocsp/nss_ocsp.h" | 25 #include "net/ocsp/nss_ocsp.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 #if defined(OS_CHROMEOS) | |
| 29 #include "chrome/browser/chromeos/cros/cros_library.h" | |
| 30 #include "chrome/browser/chromeos/cros/libcros_service_library.h" | |
| 31 #include "chrome/browser/chromeos/proxy_config_service.h" | |
| 32 #endif // defined(OS_CHROMEOS) | |
| 33 | |
| 34 class ChromeURLRequestContextFactory { | 28 class ChromeURLRequestContextFactory { |
| 35 public: | 29 public: |
| 36 ChromeURLRequestContextFactory() {} | 30 ChromeURLRequestContextFactory() {} |
| 37 virtual ~ChromeURLRequestContextFactory() {} | 31 virtual ~ChromeURLRequestContextFactory() {} |
| 38 | 32 |
| 39 // Called to create a new instance (will only be called once). | 33 // Called to create a new instance (will only be called once). |
| 40 virtual scoped_refptr<ChromeURLRequestContext> Create() = 0; | 34 virtual scoped_refptr<ChromeURLRequestContext> Create() = 0; |
| 41 | 35 |
| 42 protected: | 36 protected: |
| 43 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 37 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 net::HttpUtil::GenerateAcceptLanguageHeader(accept_language)); | 371 net::HttpUtil::GenerateAcceptLanguageHeader(accept_language)); |
| 378 } | 372 } |
| 379 | 373 |
| 380 void ChromeURLRequestContext::OnDefaultCharsetChange( | 374 void ChromeURLRequestContext::OnDefaultCharsetChange( |
| 381 const std::string& default_charset) { | 375 const std::string& default_charset) { |
| 382 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 383 set_referrer_charset(default_charset); | 377 set_referrer_charset(default_charset); |
| 384 set_accept_charset( | 378 set_accept_charset( |
| 385 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset)); | 379 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset)); |
| 386 } | 380 } |
| OLD | NEW |