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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include nit Created 7 years, 9 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
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 return false; 755 return false;
756 } 756 }
757 } 757 }
758 758
759 // Hosted apps that have script access to their background page must use 759 // Hosted apps that have script access to their background page must use
760 // process per site, since all instances can make synchronous calls to the 760 // process per site, since all instances can make synchronous calls to the
761 // background window. Other extensions should use process per site as well. 761 // background window. Other extensions should use process per site as well.
762 return true; 762 return true;
763 } 763 }
764 764
765 std::vector<std::string>
766 ChromeContentBrowserClient::GetAdditionalWebUISchemes() {
767 std::vector<std::string> additional_schemes;
768 additional_schemes.push_back(chrome::kChromeSearchScheme);
Charlie Reis 2013/03/02 04:41:09 Can you add a comment here saying this is treated
dhollowa 2013/03/04 18:39:35 Done.
769 return additional_schemes;
770 }
771
765 net::URLRequestContextGetter* 772 net::URLRequestContextGetter*
766 ChromeContentBrowserClient::CreateRequestContext( 773 ChromeContentBrowserClient::CreateRequestContext(
767 content::BrowserContext* browser_context, 774 content::BrowserContext* browser_context,
768 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 775 content::ProtocolHandlerMap* protocol_handlers) {
769 blob_protocol_handler,
770 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
771 file_system_protocol_handler,
772 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
773 developer_protocol_handler,
774 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
775 chrome_protocol_handler,
776 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
777 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(protocol_handlers);
780 file_system_protocol_handler.Pass(),
781 developer_protocol_handler.Pass(),
782 chrome_protocol_handler.Pass(),
783 chrome_devtools_protocol_handler.Pass());
784 } 778 }
785 779
786 net::URLRequestContextGetter* 780 net::URLRequestContextGetter*
787 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( 781 ChromeContentBrowserClient::CreateRequestContextForStoragePartition(
788 content::BrowserContext* browser_context, 782 content::BrowserContext* browser_context,
789 const base::FilePath& partition_path, 783 const base::FilePath& partition_path,
790 bool in_memory, 784 bool in_memory,
791 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 785 content::ProtocolHandlerMap* protocol_handlers) {
792 blob_protocol_handler,
793 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
794 file_system_protocol_handler,
795 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
796 developer_protocol_handler,
797 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
798 chrome_protocol_handler,
799 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
800 chrome_devtools_protocol_handler) {
801 Profile* profile = Profile::FromBrowserContext(browser_context); 786 Profile* profile = Profile::FromBrowserContext(browser_context);
802 return profile->CreateRequestContextForStoragePartition( 787 return profile->CreateRequestContextForStoragePartition(
803 partition_path, 788 partition_path, in_memory, protocol_handlers);
804 in_memory,
805 blob_protocol_handler.Pass(),
806 file_system_protocol_handler.Pass(),
807 developer_protocol_handler.Pass(),
808 chrome_protocol_handler.Pass(),
809 chrome_devtools_protocol_handler.Pass());
810 } 789 }
811 790
812 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { 791 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) {
813 return ProfileIOData::IsHandledURL(url); 792 return ProfileIOData::IsHandledURL(url);
814 } 793 }
815 794
816 bool ChromeContentBrowserClient::IsSuitableHost( 795 bool ChromeContentBrowserClient::IsSuitableHost(
817 content::RenderProcessHost* process_host, 796 content::RenderProcessHost* process_host,
818 const GURL& site_url) { 797 const GURL& site_url) {
819 Profile* profile = 798 Profile* profile =
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 io_thread_application_locale_ = locale; 2074 io_thread_application_locale_ = locale;
2096 } 2075 }
2097 2076
2098 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 2077 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
2099 const std::string& locale) { 2078 const std::string& locale) {
2100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2079 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2101 io_thread_application_locale_ = locale; 2080 io_thread_application_locale_ = locale;
2102 } 2081 }
2103 2082
2104 } // namespace chrome 2083 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698