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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.cc

Issue 2633663003: Implements strict secure cookies as the default behavior in //net (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 base::Time remove_end; 194 base::Time remove_end;
195 StoragePartition::OriginMatcherFunction origin_matcher; 195 StoragePartition::OriginMatcherFunction origin_matcher;
196 StoragePartition::CookieMatcherFunction cookie_matcher; 196 StoragePartition::CookieMatcherFunction cookie_matcher;
197 197
198 StoragePartitionRemovalData() {} 198 StoragePartitionRemovalData() {}
199 }; 199 };
200 200
201 net::CanonicalCookie CreateCookieWithHost(const GURL& source) { 201 net::CanonicalCookie CreateCookieWithHost(const GURL& source) {
202 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( 202 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create(
203 source, "A", "1", std::string(), "/", base::Time::Now(), 203 source, "A", "1", std::string(), "/", base::Time::Now(),
204 base::Time::Now(), false, false, net::CookieSameSite::DEFAULT_MODE, false, 204 base::Time::Now(), false, false, net::CookieSameSite::DEFAULT_MODE,
205 net::COOKIE_PRIORITY_MEDIUM)); 205 net::COOKIE_PRIORITY_MEDIUM));
206 EXPECT_TRUE(cookie); 206 EXPECT_TRUE(cookie);
207 return *cookie; 207 return *cookie;
208 } 208 }
209 209
210 class TestStoragePartition : public StoragePartition { 210 class TestStoragePartition : public StoragePartition {
211 public: 211 public:
212 TestStoragePartition() {} 212 TestStoragePartition() {}
213 ~TestStoragePartition() override {} 213 ~TestStoragePartition() override {}
214 214
(...skipping 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 // There should be no recently visited bookmarks. 3118 // There should be no recently visited bookmarks.
3119 EXPECT_THAT(ntp_snippets::GetRecentlyVisitedBookmarks( 3119 EXPECT_THAT(ntp_snippets::GetRecentlyVisitedBookmarks(
3120 bookmark_model, 2, base::Time::UnixEpoch(), 3120 bookmark_model, 2, base::Time::UnixEpoch(),
3121 /*consider_visits_from_desktop=*/false), 3121 /*consider_visits_from_desktop=*/false),
3122 IsEmpty()); 3122 IsEmpty());
3123 EXPECT_THAT(ntp_snippets::GetRecentlyVisitedBookmarks( 3123 EXPECT_THAT(ntp_snippets::GetRecentlyVisitedBookmarks(
3124 bookmark_model, 2, base::Time::UnixEpoch(), 3124 bookmark_model, 2, base::Time::UnixEpoch(),
3125 /*consider_visits_from_desktop=*/true), 3125 /*consider_visits_from_desktop=*/true),
3126 IsEmpty()); 3126 IsEmpty());
3127 } 3127 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/cookies/cookies_api.cc » ('j') | net/cookies/cookie_monster.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698