Update for changes to net::FileProtocolHandler in Chrome 31

I just copied the way that Chrome initializes this object.
This commit is contained in:
Adam Roben 2013-12-02 11:39:26 -05:00
parent 265076f19a
commit cfeddb5bcb

View file

@ -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());
}