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 471bac33c589762f02ef08c35923556d993717b7..382b0a4d96bae0bc6500034a6170827a9aa89686 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" |
| @@ -251,6 +252,13 @@ void OffTheRecordProfileIOData::LazyInitializeInternal( |
| main_job_factory_.reset(new net::URLRequestJobFactory); |
| extensions_job_factory_.reset(new net::URLRequestJobFactory); |
| + int set_protocol = main_job_factory_->SetProtocolHandler( |
| + chrome::kFileScheme, new net::FileProtocolHandler(network_delegate())); |
| + DCHECK(set_protocol); |
| + set_protocol = extensions_job_factory_->SetProtocolHandler( |
| + chrome::kFileScheme, new net::FileProtocolHandler(NULL)); |
|
mmenke
2012/08/15 14:57:16
Suggest a comment that a FileProtocolHandler witho
erikwright (departed)
2012/08/15 19:02:03
Wouldn't an unknown scheme be a reasonable treatme
mmenke1
2012/08/15 19:13:16
We currently blindly try to pass unknown schemes t
shalev
2012/08/15 21:23:41
Done.
|
| + DCHECK(set_protocol); |
| + |
| net::URLRequestJobFactory* job_factories[2]; |
| job_factories[0] = main_job_factory_.get(); |
| job_factories[1] = extensions_job_factory_.get(); |