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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.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 | « android_webview/native/cookie_manager.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover_unittest.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
index 334c55011165502b2d100768eb07fd689a6832f3..7324ded6a611c3efdc32d9f32932f225e2fe2b3a 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
@@ -49,6 +49,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "net/cookies/cookie_store.h"
#include "net/ssl/server_bound_cert_service.h"
#include "net/ssl/server_bound_cert_store.h"
#include "net/ssl/ssl_client_cert_type.h"
@@ -235,13 +236,13 @@ class TestStoragePartition : public StoragePartition {
class RemoveCookieTester {
public:
- RemoveCookieTester() : get_cookie_success_(false), monster_(NULL) {
+ RemoveCookieTester() : get_cookie_success_(false), cookie_store_(NULL) {
}
// Returns true, if the given cookie exists in the cookie store.
bool ContainsCookie() {
get_cookie_success_ = false;
- monster_->GetCookiesWithOptionsAsync(
+ cookie_store_->GetCookiesWithOptionsAsync(
kOrigin1, net::CookieOptions(),
base::Bind(&RemoveCookieTester::GetCookieCallback,
base::Unretained(this)));
@@ -250,7 +251,7 @@ class RemoveCookieTester {
}
void AddCookie() {
- monster_->SetCookieWithOptionsAsync(
+ cookie_store_->SetCookieWithOptionsAsync(
kOrigin1, "A=1", net::CookieOptions(),
base::Bind(&RemoveCookieTester::SetCookieCallback,
base::Unretained(this)));
@@ -259,7 +260,7 @@ class RemoveCookieTester {
protected:
void SetMonster(net::CookieStore* monster) {
- monster_ = monster;
+ cookie_store_ = monster;
}
private:
@@ -280,7 +281,7 @@ class RemoveCookieTester {
bool get_cookie_success_;
AwaitCompletionHelper await_completion_;
- net::CookieStore* monster_;
+ net::CookieStore* cookie_store_;
DISALLOW_COPY_AND_ASSIGN(RemoveCookieTester);
};
@@ -298,7 +299,8 @@ class RemoveSafeBrowsingCookieTester : public RemoveCookieTester {
// Create a cookiemonster that does not have persistant storage, and replace
// the SafeBrowsingService created one with it.
- net::CookieStore* monster = content::CreateInMemoryCookieStore(NULL);
+ net::CookieStore* monster =
+ content::CreateCookieStore(content::CookieStoreConfig());
sb_service->url_request_context()->GetURLRequestContext()->
set_cookie_store(monster);
SetMonster(monster);
« no previous file with comments | « android_webview/native/cookie_manager.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698