Chromium Code Reviews| Index: chrome/browser/profiles/off_the_record_profile_io_data.cc |
| diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| index 830d6df17e42294fb8ae4fb32561180725cc1835..04bbddb052c90f878e7976462bb9fe5112393b06 100644 |
| --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| @@ -27,6 +27,7 @@ |
| #include "net/ftp/ftp_network_layer.h" |
| #include "net/http/http_cache.h" |
| #include "net/http/http_server_properties_impl.h" |
| +#include "net/url_request/file_protocol_handler.h" |
| #include "net/url_request/ftp_protocol_handler.h" |
| #include "net/url_request/url_request_job_factory.h" |
| #include "webkit/database/database_tracker.h" |
| @@ -261,6 +262,7 @@ void OffTheRecordProfileIOData::LazyInitializeInternal( |
| for (int i = 0; i < 2; i++) { |
| SetUpJobFactoryDefaults(job_factories[i]); |
| + CreateFileProtocolHandler(job_factories[i]); |
| CreateFtpProtocolHandler(job_factories[i], ftp_auth_caches[i]); |
| } |
| @@ -311,6 +313,13 @@ OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( |
| return app_request_context; |
| } |
| +void OffTheRecordProfileIOData::CreateFileProtocolHandler( |
| + net::URLRequestJobFactory* job_factory) const { |
| + job_factory->SetProtocolHandler( |
| + chrome::kFtpScheme, |
|
erikwright (departed)
2012/07/13 14:50:36
kFileScheme?
shalev
2012/07/17 19:40:16
Done.
|
| + new net::FileProtocolHandler(network_delegate())); |
| +} |
| + |
| void OffTheRecordProfileIOData::CreateFtpProtocolHandler( |
| net::URLRequestJobFactory* job_factory, |
| net::FtpAuthCache* ftp_auth_cache) const { |
| @@ -319,4 +328,3 @@ void OffTheRecordProfileIOData::CreateFtpProtocolHandler( |
| new net::FtpProtocolHandler( |
| network_delegate(), ftp_factory_.get(), ftp_auth_cache)); |
| } |
| - |