Give user a chance to create custom URLRequestJobFactory.
This commit is contained in:
parent
d01aa51686
commit
2d03c983e4
4 changed files with 34 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/resource_context.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "net/url_request/url_request_job_factory_impl.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "base/nix/xdg_util.h"
|
||||
|
@ -109,6 +110,7 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
|
|||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
|
||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
|
||||
base::Bind(&BrowserContext::CreateNetworkDelegate, base::Unretained(this)),
|
||||
base::Bind(&BrowserContext::CreateURLRequestJobFactory, base::Unretained(this)),
|
||||
protocol_handlers,
|
||||
protocol_interceptors.Pass());
|
||||
resource_context_->set_url_request_context_getter(url_request_getter_.get());
|
||||
|
@ -119,6 +121,12 @@ scoped_ptr<NetworkDelegate> BrowserContext::CreateNetworkDelegate() {
|
|||
return make_scoped_ptr(new NetworkDelegate).Pass();
|
||||
}
|
||||
|
||||
scoped_ptr<net::URLRequestJobFactory> BrowserContext::CreateURLRequestJobFactory(
|
||||
const content::ProtocolHandlerMap& protocol_handlers,
|
||||
const content::ProtocolHandlerScopedVector& protocol_interceptors) {
|
||||
return scoped_ptr<net::URLRequestJobFactory>();
|
||||
}
|
||||
|
||||
base::FilePath BrowserContext::GetPath() const {
|
||||
return path_;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue