Update cookie store code for Chrome 35
See https://codereview.chromium.org/110883017
This commit is contained in:
parent
afc889b883
commit
51ac56e4c4
1 changed files with 7 additions and 6 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_storage.h"
|
||||
#include "net/url_request/url_request_job_factory_impl.h"
|
||||
#include "webkit/browser/quota/special_storage_policy.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
|
@ -74,12 +75,12 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
|||
url_request_context_->set_network_delegate(network_delegate_.get());
|
||||
storage_.reset(
|
||||
new net::URLRequestContextStorage(url_request_context_.get()));
|
||||
storage_->set_cookie_store(content::CreatePersistentCookieStore(
|
||||
auto cookie_config = content::CookieStoreConfig(
|
||||
base_path_.Append(FILE_PATH_LITERAL("Cookies")),
|
||||
false,
|
||||
content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr));
|
||||
nullptr);
|
||||
storage_->set_cookie_store(content::CreateCookieStore(cookie_config));
|
||||
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
|
||||
new net::DefaultServerBoundCertStore(NULL),
|
||||
base::WorkerPool::GetTaskRunner(true)));
|
||||
|
@ -157,9 +158,9 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
|||
}
|
||||
protocol_handlers_.clear();
|
||||
job_factory->SetProtocolHandler(
|
||||
chrome::kDataScheme, new net::DataProtocolHandler);
|
||||
content::kDataScheme, new net::DataProtocolHandler);
|
||||
job_factory->SetProtocolHandler(
|
||||
chrome::kFileScheme,
|
||||
content::kFileScheme,
|
||||
new net::FileProtocolHandler(
|
||||
content::BrowserThread::GetBlockingPool()->
|
||||
GetTaskRunnerWithShutdownBehavior(
|
||||
|
|
Loading…
Reference in a new issue