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

Side by Side Diff: android_webview/browser/net/aw_cookie_store_wrapper_unittest.cc

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: merge Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/net/aw_cookie_store_wrapper.h" 5 #include "android_webview/browser/net/aw_cookie_store_wrapper.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/cookies/cookie_store.h" 8 #include "net/cookies/cookie_store.h"
9 #include "net/cookies/cookie_store_test_callbacks.h" 9 #include "net/cookies/cookie_store_test_callbacks.h"
10 #include "net/cookies/cookie_store_unittest.h" 10 #include "net/cookies/cookie_store_unittest.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace android_webview { 13 namespace android_webview {
14 14
15 struct AwCookieStoreWrapperTestTraits { 15 struct AwCookieStoreWrapperTestTraits {
16 static scoped_refptr<net::CookieStore> Create() { 16 static scoped_ptr<net::CookieStore> Create() {
17 scoped_refptr<net::CookieStore> cookie_store(new AwCookieStoreWrapper()); 17 scoped_ptr<net::CookieStore> cookie_store(new AwCookieStoreWrapper());
18 18
19 // Android Webview can run multiple tests without restarting the binary, 19 // Android Webview can run multiple tests without restarting the binary,
20 // so have to delete any cookies the global store may have from an earlier 20 // so have to delete any cookies the global store may have from an earlier
21 // test. 21 // test.
22 net::ResultSavingCookieCallback<int> callback; 22 net::ResultSavingCookieCallback<int> callback;
23 cookie_store->DeleteAllAsync( 23 cookie_store->DeleteAllAsync(
24 base::Bind(&net::ResultSavingCookieCallback<int>::Run, 24 base::Bind(&net::ResultSavingCookieCallback<int>::Run,
25 base::Unretained(&callback))); 25 base::Unretained(&callback)));
26 callback.WaitUntilDone(); 26 callback.WaitUntilDone();
27 27
(...skipping 11 matching lines...) Expand all
39 39
40 } // namespace android_webview 40 } // namespace android_webview
41 41
42 // Run the standard cookie tests with AwCookieStoreWrapper. Macro must be in 42 // Run the standard cookie tests with AwCookieStoreWrapper. Macro must be in
43 // net namespace. 43 // net namespace.
44 namespace net { 44 namespace net {
45 INSTANTIATE_TYPED_TEST_CASE_P(AwCookieStoreWrapper, 45 INSTANTIATE_TYPED_TEST_CASE_P(AwCookieStoreWrapper,
46 CookieStoreTest, 46 CookieStoreTest,
47 android_webview::AwCookieStoreWrapperTestTraits); 47 android_webview::AwCookieStoreWrapperTestTraits);
48 } // namespace net 48 } // namespace net
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_cookie_store_wrapper.cc ('k') | android_webview/browser/net/aw_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698