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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Charlie's comments. 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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 } 811 }
812 812
813 base::FilePath ProfileImpl::GetPrefFilePath() { 813 base::FilePath ProfileImpl::GetPrefFilePath() {
814 base::FilePath pref_file_path = path_; 814 base::FilePath pref_file_path = path_;
815 pref_file_path = pref_file_path.Append(chrome::kPreferencesFilename); 815 pref_file_path = pref_file_path.Append(chrome::kPreferencesFilename);
816 return pref_file_path; 816 return pref_file_path;
817 } 817 }
818 818
819 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( 819 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext(
820 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 820 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
821 blob_protocol_handler,
822 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
823 file_system_protocol_handler,
824 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
825 developer_protocol_handler, 821 developer_protocol_handler,
826 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 822 content::ProtocolHandlerMap* protocol_handlers) {
827 chrome_protocol_handler,
828 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
829 chrome_devtools_protocol_handler) {
830 return io_data_.CreateMainRequestContextGetter( 823 return io_data_.CreateMainRequestContextGetter(
831 blob_protocol_handler.Pass(),
832 file_system_protocol_handler.Pass(),
833 developer_protocol_handler.Pass(), 824 developer_protocol_handler.Pass(),
834 chrome_protocol_handler.Pass(), 825 protocol_handlers,
835 chrome_devtools_protocol_handler.Pass(),
836 g_browser_process->local_state(), 826 g_browser_process->local_state(),
837 g_browser_process->io_thread()); 827 g_browser_process->io_thread());
838 } 828 }
839 829
840 net::URLRequestContextGetter* ProfileImpl::GetRequestContext() { 830 net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
841 return GetDefaultStoragePartition(this)->GetURLRequestContext(); 831 return GetDefaultStoragePartition(this)->GetURLRequestContext();
842 } 832 }
843 833
844 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( 834 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
845 int renderer_child_id) { 835 int renderer_child_id) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 868
879 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { 869 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
880 return io_data_.GetExtensionsRequestContextGetter(); 870 return io_data_.GetExtensionsRequestContextGetter();
881 } 871 }
882 872
883 net::URLRequestContextGetter* 873 net::URLRequestContextGetter*
884 ProfileImpl::CreateRequestContextForStoragePartition( 874 ProfileImpl::CreateRequestContextForStoragePartition(
885 const base::FilePath& partition_path, 875 const base::FilePath& partition_path,
886 bool in_memory, 876 bool in_memory,
887 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 877 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
888 blob_protocol_handler,
889 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
890 file_system_protocol_handler,
891 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
892 developer_protocol_handler, 878 developer_protocol_handler,
893 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 879 content::ProtocolHandlerMap* protocol_handlers) {
894 chrome_protocol_handler,
895 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
896 chrome_devtools_protocol_handler) {
897 return io_data_.CreateIsolatedAppRequestContextGetter( 880 return io_data_.CreateIsolatedAppRequestContextGetter(
898 partition_path, in_memory, blob_protocol_handler.Pass(), 881 partition_path, in_memory, developer_protocol_handler.Pass(),
899 file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), 882 protocol_handlers);
900 chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass());
901 } 883 }
902 884
903 net::SSLConfigService* ProfileImpl::GetSSLConfigService() { 885 net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
904 // If ssl_config_service_manager_ is null, this typically means that some 886 // If ssl_config_service_manager_ is null, this typically means that some
905 // ProfileKeyedService is trying to create a RequestContext at startup, but 887 // ProfileKeyedService is trying to create a RequestContext at startup, but
906 // SSLConfigServiceManager is not initialized until DoFinalInit() which is 888 // SSLConfigServiceManager is not initialized until DoFinalInit() which is
907 // invoked after all ProfileKeyedServices have been initialized (see 889 // invoked after all ProfileKeyedServices have been initialized (see
908 // http://crbug.com/171406). 890 // http://crbug.com/171406).
909 DCHECK(ssl_config_service_manager_.get()) << 891 DCHECK(ssl_config_service_manager_.get()) <<
910 "SSLConfigServiceManager is not initialized yet"; 892 "SSLConfigServiceManager is not initialized yet";
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 base::FilePath* cache_path, 1164 base::FilePath* cache_path,
1183 int* max_size) { 1165 int* max_size) {
1184 DCHECK(cache_path); 1166 DCHECK(cache_path);
1185 DCHECK(max_size); 1167 DCHECK(max_size);
1186 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1168 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1187 if (!path.empty()) 1169 if (!path.empty())
1188 *cache_path = path; 1170 *cache_path = path;
1189 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1171 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1190 prefs_->GetInteger(prefs::kDiskCacheSize); 1172 prefs_->GetInteger(prefs::kDiskCacheSize);
1191 } 1173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698