| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 } | 763 } |
| 764 | 764 |
| 765 net::URLRequestContextGetter* | 765 net::URLRequestContextGetter* |
| 766 ChromeContentBrowserClient::CreateRequestContext( | 766 ChromeContentBrowserClient::CreateRequestContext( |
| 767 content::BrowserContext* browser_context, | 767 content::BrowserContext* browser_context, |
| 768 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 768 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 769 blob_protocol_handler, | 769 blob_protocol_handler, |
| 770 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 770 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 771 file_system_protocol_handler, | 771 file_system_protocol_handler, |
| 772 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 772 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 773 developer_protocol_handler, | |
| 774 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 775 chrome_protocol_handler, | 773 chrome_protocol_handler, |
| 776 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 774 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 777 chrome_devtools_protocol_handler) { | 775 chrome_devtools_protocol_handler) { |
| 778 Profile* profile = Profile::FromBrowserContext(browser_context); | 776 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 779 return profile->CreateRequestContext(blob_protocol_handler.Pass(), | 777 return profile->CreateRequestContext(blob_protocol_handler.Pass(), |
| 780 file_system_protocol_handler.Pass(), | 778 file_system_protocol_handler.Pass(), |
| 781 developer_protocol_handler.Pass(), | |
| 782 chrome_protocol_handler.Pass(), | 779 chrome_protocol_handler.Pass(), |
| 783 chrome_devtools_protocol_handler.Pass()); | 780 chrome_devtools_protocol_handler.Pass()); |
| 784 } | 781 } |
| 785 | 782 |
| 786 net::URLRequestContextGetter* | 783 net::URLRequestContextGetter* |
| 787 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( | 784 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( |
| 788 content::BrowserContext* browser_context, | 785 content::BrowserContext* browser_context, |
| 789 const base::FilePath& partition_path, | 786 const base::FilePath& partition_path, |
| 790 bool in_memory, | 787 bool in_memory, |
| 791 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 788 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 792 blob_protocol_handler, | 789 blob_protocol_handler, |
| 793 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 790 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 794 file_system_protocol_handler, | 791 file_system_protocol_handler, |
| 795 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 792 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 796 developer_protocol_handler, | |
| 797 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 798 chrome_protocol_handler, | 793 chrome_protocol_handler, |
| 799 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 794 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 800 chrome_devtools_protocol_handler) { | 795 chrome_devtools_protocol_handler) { |
| 801 Profile* profile = Profile::FromBrowserContext(browser_context); | 796 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 802 return profile->CreateRequestContextForStoragePartition( | 797 return profile->CreateRequestContextForStoragePartition( |
| 803 partition_path, | 798 partition_path, |
| 804 in_memory, | 799 in_memory, |
| 805 blob_protocol_handler.Pass(), | 800 blob_protocol_handler.Pass(), |
| 806 file_system_protocol_handler.Pass(), | 801 file_system_protocol_handler.Pass(), |
| 807 developer_protocol_handler.Pass(), | |
| 808 chrome_protocol_handler.Pass(), | 802 chrome_protocol_handler.Pass(), |
| 809 chrome_devtools_protocol_handler.Pass()); | 803 chrome_devtools_protocol_handler.Pass()); |
| 810 } | 804 } |
| 811 | 805 |
| 812 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 806 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
| 813 return ProfileIOData::IsHandledURL(url); | 807 return ProfileIOData::IsHandledURL(url); |
| 814 } | 808 } |
| 815 | 809 |
| 816 bool ChromeContentBrowserClient::IsSuitableHost( | 810 bool ChromeContentBrowserClient::IsSuitableHost( |
| 817 content::RenderProcessHost* process_host, | 811 content::RenderProcessHost* process_host, |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 io_thread_application_locale_ = locale; | 2085 io_thread_application_locale_ = locale; |
| 2092 } | 2086 } |
| 2093 | 2087 |
| 2094 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2088 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
| 2095 const std::string& locale) { | 2089 const std::string& locale) { |
| 2096 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2090 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2097 io_thread_application_locale_ = locale; | 2091 io_thread_application_locale_ = locale; |
| 2098 } | 2092 } |
| 2099 | 2093 |
| 2100 } // namespace chrome | 2094 } // namespace chrome |
| OLD | NEW |