mirror of
https://github.com/electron/electron.git
synced 2026-01-29 01:08:18 -05:00
Update for changes to net::FileProtocolHandler in Chrome 31
I just copied the way that Chrome initializes this object.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "browser/network_delegate.h"
|
||||
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/threading/sequenced_worker_pool.h"
|
||||
#include "base/threading/worker_pool.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/cookie_store_factory.h"
|
||||
@@ -142,7 +143,11 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
||||
job_factory->SetProtocolHandler(
|
||||
chrome::kDataScheme, new net::DataProtocolHandler);
|
||||
job_factory->SetProtocolHandler(
|
||||
chrome::kFileScheme, new net::FileProtocolHandler);
|
||||
chrome::kFileScheme,
|
||||
new net::FileProtocolHandler(
|
||||
content::BrowserThread::GetBlockingPool()->
|
||||
GetTaskRunnerWithShutdownBehavior(
|
||||
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
|
||||
storage_->set_job_factory(job_factory.release());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user