Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2157)

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 110883017: Add CookieStoreConfig to unify API for in-memory and persistent CookieStore Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge ToT again. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/cookie_store_util.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 4e20401c79323d5597e24f047a2d274c4f763d74..201a3d7e47438667dc20d2aa9a489ca60802207e 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -201,9 +201,13 @@ void OffTheRecordProfileIOData::InitializeInternal(
set_server_bound_cert_service(server_bound_cert_service);
main_context->set_server_bound_cert_service(server_bound_cert_service);
+ using content::CookieStoreConfig;
main_context->set_cookie_store(
- content::CreateInMemoryCookieStore(
- profile_params->cookie_monster_delegate.get()));
+ CreateCookieStore(CookieStoreConfig(
+ base::FilePath(),
+ CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
+ NULL,
+ profile_params->cookie_monster_delegate.get())));
net::HttpCache::BackendFactory* main_backend =
net::HttpCache::DefaultBackend::InMemory(0);
@@ -254,7 +258,8 @@ void OffTheRecordProfileIOData::
// All we care about for extensions is the cookie store. For incognito, we
// use a non-persistent cookie store.
net::CookieMonster* extensions_cookie_store =
- content::CreateInMemoryCookieStore(NULL)->GetCookieMonster();
+ content::CreateCookieStore(content::CookieStoreConfig())->
+ GetCookieMonster();
// Enable cookies for devtools and extension URLs.
const char* schemes[] = {chrome::kChromeDevToolsScheme,
extensions::kExtensionScheme};
@@ -292,7 +297,8 @@ OffTheRecordProfileIOData::InitializeAppRequestContext(
// Use a separate in-memory cookie store for the app.
// TODO(creis): We should have a cookie delegate for notifying the cookie
// extensions API, but we need to update it to understand isolated apps first.
- context->SetCookieStore(content::CreateInMemoryCookieStore(NULL));
+ context->SetCookieStore(
+ content::CreateCookieStore(content::CookieStoreConfig()));
// Use a separate in-memory cache for the app.
net::HttpCache::BackendFactory* app_backend =
« no previous file with comments | « chrome/browser/net/cookie_store_util.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698