Skip to content

Commit

Permalink
Fixed initialization of cookie_config.crypto_delegate to encrypt cook…
Browse files Browse the repository at this point in the history
…ies at rest.

fixes brave/browser-laptop#10044
Auditors: @bridiver, @darkdh
  • Loading branch information
jumde committed Jul 24, 2017
1 parent 11ab896 commit 1952302
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions vendor/brightray/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ source_set("browser") {

deps = [
"//third_party/WebKit/public:blink_headers",
"//components/cookie_config",
"//content/shell:resources",
"//net",
":common",
Expand Down
3 changes: 3 additions & 0 deletions vendor/brightray/browser/url_request_context_getter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "chrome/browser/devtools/devtools_network_controller_handle.h"
#include "chrome/browser/devtools/devtools_network_transaction_factory.h"
#include "common/switches.h"
#include "components/cookie_config/cookie_store_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
Expand Down Expand Up @@ -199,13 +200,15 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
if (in_memory_) {
auto cookie_config = content::CookieStoreConfig();
cookie_config.cookieable_schemes = delegate_->GetCookieableSchemes();
cookie_config.crypto_delegate = cookie_config::GetCookieCryptoDelegate();
cookie_store = content::CreateCookieStore(cookie_config);
} else {
auto cookie_config = content::CookieStoreConfig(
base_path_.Append(FILE_PATH_LITERAL("Cookies")),
content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
nullptr, nullptr);
cookie_config.cookieable_schemes = delegate_->GetCookieableSchemes();
cookie_config.crypto_delegate = cookie_config::GetCookieCryptoDelegate();
cookie_store = content::CreateCookieStore(cookie_config);
}
storage_->set_cookie_store(std::move(cookie_store));
Expand Down

0 comments on commit 1952302

Please sign in to comment.