summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorbcwhite@chromium.org <bcwhite@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 18:40:56 +0000
committerbcwhite@chromium.org <bcwhite@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 18:40:56 +0000
commit582fce2bafb46d8114ed412675171178052e343c (patch)
tree205708ee4ac532c3e685f8a8dd5ec8c8b87913af /android_webview
parentf431d3cfe81a97b45803d6258f9a66ab3a7186dc (diff)
downloadchromium_src-582fce2bafb46d8114ed412675171178052e343c.zip
chromium_src-582fce2bafb46d8114ed412675171178052e343c.tar.gz
chromium_src-582fce2bafb46d8114ed412675171178052e343c.tar.bz2
Encrypt all stored cookies on selected operating systems.
As part of the goal of protecting private user information, this encrypts the cookie values on operating systems with user-specific crypto APIs and that do not otherwise protect this data. Performance tests indicate a penalty of about 1ms per cookie (regardless of size) on a Mac and 0.1ms to 0.7ms (depending on the size) under Windows. This will be higher on older hardware but still insignificant. Encrypted data is binary (with an overhead of 128 bytes on Windows) and binary data must be stored in a BLOB so only one of two fields ("value" or "encrypted_value") will have data with the other being empty. Both values, however, need to be read & written when accessing a cookie because they are marked "non null"). BUG=313323 Review URL: https://codereview.chromium.org/24734007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/browser/aw_browser_context.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 70c2507..cd10e6a 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -22,6 +22,7 @@
#include "components/user_prefs/user_prefs.h"
#include "components/visitedlink/browser/visitedlink_master.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/cookie_crypto_delegate.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/storage_partition.h"
@@ -144,7 +145,8 @@ void AwBrowserContext::PreMainMessageLoopRun() {
NULL,
NULL,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- background_task_runner);
+ background_task_runner,
+ scoped_ptr<content::CookieCryptoDelegate>());
cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true);
url_request_context_getter_ =