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

Side by Side Diff: ios/net/cookies/cookie_store_ios_unittest.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | ios/net/crn_http_protocol_handler.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "ios/net/cookies/cookie_store_ios.h" 5 #include "ios/net/cookies/cookie_store_ios.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 static const bool filters_schemes = false; 46 static const bool filters_schemes = false;
47 static const bool has_path_prefix_bug = true; 47 static const bool has_path_prefix_bug = true;
48 static const int creation_time_granularity_in_ms = 1000; 48 static const int creation_time_granularity_in_ms = 1000;
49 static const bool enforce_strict_secure = false; 49 static const bool enforce_strict_secure = false;
50 50
51 base::MessageLoop loop_; 51 base::MessageLoop loop_;
52 }; 52 };
53 53
54 struct InactiveCookieStoreIOSTestTraits { 54 struct InactiveCookieStoreIOSTestTraits {
55 static std::unique_ptr<net::CookieStore> Create() { 55 static std::unique_ptr<net::CookieStore> Create() {
56 return base::WrapUnique(new CookieStoreIOS(nullptr)); 56 return base::MakeUnique<CookieStoreIOS>(nullptr);
57 } 57 }
58 58
59 static const bool is_cookie_monster = false; 59 static const bool is_cookie_monster = false;
60 static const bool supports_http_only = false; 60 static const bool supports_http_only = false;
61 static const bool supports_non_dotted_domains = true; 61 static const bool supports_non_dotted_domains = true;
62 static const bool preserves_trailing_dots = true; 62 static const bool preserves_trailing_dots = true;
63 static const bool filters_schemes = false; 63 static const bool filters_schemes = false;
64 static const bool has_path_prefix_bug = false; 64 static const bool has_path_prefix_bug = false;
65 static const int creation_time_granularity_in_ms = 0; 65 static const int creation_time_granularity_in_ms = 0;
66 static const int enforces_prefixes = true; 66 static const int enforces_prefixes = true;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 std::unique_ptr<CookieStoreIOS> store_; 199 std::unique_ptr<CookieStoreIOS> store_;
200 // |dummy_store_| is not directly used, but is needed to make |store_| 200 // |dummy_store_| is not directly used, but is needed to make |store_|
201 // inactive. 201 // inactive.
202 std::unique_ptr<CookieStoreIOS> dummy_store_; 202 std::unique_ptr<CookieStoreIOS> dummy_store_;
203 }; 203 };
204 204
205 struct RoundTripTestCookieStoreTraits { 205 struct RoundTripTestCookieStoreTraits {
206 static std::unique_ptr<net::CookieStore> Create() { 206 static std::unique_ptr<net::CookieStore> Create() {
207 ClearCookies(); 207 ClearCookies();
208 return base::WrapUnique(new RoundTripTestCookieStore()); 208 return base::MakeUnique<RoundTripTestCookieStore>();
209 } 209 }
210 210
211 static const bool is_cookie_monster = false; 211 static const bool is_cookie_monster = false;
212 static const bool supports_http_only = false; 212 static const bool supports_http_only = false;
213 static const bool supports_non_dotted_domains = false; 213 static const bool supports_non_dotted_domains = false;
214 static const bool preserves_trailing_dots = false; 214 static const bool preserves_trailing_dots = false;
215 static const bool filters_schemes = false; 215 static const bool filters_schemes = false;
216 static const bool has_path_prefix_bug = true; 216 static const bool has_path_prefix_bug = true;
217 static const int creation_time_granularity_in_ms = 1000; 217 static const int creation_time_granularity_in_ms = 1000;
218 static const int enforces_prefixes = true; 218 static const int enforces_prefixes = true;
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 EXPECT_EQ(2U, cookies.size()); 993 EXPECT_EQ(2U, cookies.size());
994 // this deletes the callback 994 // this deletes the callback
995 handle.reset(); 995 handle.reset();
996 SetSystemCookie(kTestCookieURL, "abc", "jkl"); 996 SetSystemCookie(kTestCookieURL, "abc", "jkl");
997 EXPECT_EQ(2U, cookies.size()); 997 EXPECT_EQ(2U, cookies.size());
998 DeleteSystemCookie(kTestCookieURL, "abc"); 998 DeleteSystemCookie(kTestCookieURL, "abc");
999 store_->UnSynchronize(); 999 store_->UnSynchronize();
1000 } 1000 }
1001 1001
1002 } // namespace net 1002 } // namespace net
OLDNEW
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | ios/net/crn_http_protocol_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698