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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid DCHECK in GetExtensionInfoMap() during Init() Created 8 years 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 return false; 687 return false;
688 } 688 }
689 } 689 }
690 690
691 // Hosted apps that have script access to their background page must use 691 // Hosted apps that have script access to their background page must use
692 // process per site, since all instances can make synchronous calls to the 692 // process per site, since all instances can make synchronous calls to the
693 // background window. Other extensions should use process per site as well. 693 // background window. Other extensions should use process per site as well.
694 return true; 694 return true;
695 } 695 }
696 696
697 net::URLRequestContextGetter*
698 ChromeContentBrowserClient::CreateRequestContext(
699 content::BrowserContext* browser_context,
700 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
701 blob_protocol_handler,
702 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
703 file_system_protocol_handler,
704 scoped_ptr<net::URLRequestJobFactory::Interceptor>
705 developer_protocol_handler) {
706 Profile* profile = Profile::FromBrowserContext(browser_context);
707 return profile->CreateRequestContext(blob_protocol_handler.Pass(),
708 file_system_protocol_handler.Pass(),
709 developer_protocol_handler.Pass());
710 }
711
712 net::URLRequestContextGetter*
713 ChromeContentBrowserClient::CreateRequestContextForStoragePartition(
714 content::BrowserContext* browser_context,
715 const FilePath& partition_path,
716 bool in_memory,
717 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
718 blob_protocol_handler,
719 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
720 file_system_protocol_handler,
721 scoped_ptr<net::URLRequestJobFactory::Interceptor>
722 developer_protocol_handler) {
723 Profile* profile = Profile::FromBrowserContext(browser_context);
724 return profile->CreateRequestContextForStoragePartition(
725 partition_path,
726 in_memory,
727 blob_protocol_handler.Pass(),
728 file_system_protocol_handler.Pass(),
729 developer_protocol_handler.Pass());
730 }
731
697 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { 732 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) {
698 return ProfileIOData::IsHandledURL(url); 733 return ProfileIOData::IsHandledURL(url);
699 } 734 }
700 735
701 bool ChromeContentBrowserClient::IsSuitableHost( 736 bool ChromeContentBrowserClient::IsSuitableHost(
702 content::RenderProcessHost* process_host, 737 content::RenderProcessHost* process_host,
703 const GURL& site_url) { 738 const GURL& site_url) {
704 Profile* profile = 739 Profile* profile =
705 Profile::FromBrowserContext(process_host->GetBrowserContext()); 740 Profile::FromBrowserContext(process_host->GetBrowserContext());
706 ExtensionService* service = 741 ExtensionService* service =
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 io_thread_application_locale_ = locale; 1967 io_thread_application_locale_ = locale;
1933 } 1968 }
1934 1969
1935 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1970 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1936 const std::string& locale) { 1971 const std::string& locale) {
1937 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1972 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1938 io_thread_application_locale_ = locale; 1973 io_thread_application_locale_ = locale;
1939 } 1974 }
1940 1975
1941 } // namespace chrome 1976 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698