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

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

Issue 1615773005: Rename first-party-only cookies to same-site cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a few. Created 4 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/cookies_tree_model.h" 5 #include "chrome/browser/browsing_data/cookies_tree_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 group_by_cookie_source_(group_by_cookie_source) { 985 group_by_cookie_source_(group_by_cookie_source) {
986 data_container_->Init(this); 986 data_container_->Init(this);
987 } 987 }
988 988
989 CookiesTreeModel::~CookiesTreeModel() { 989 CookiesTreeModel::~CookiesTreeModel() {
990 } 990 }
991 991
992 // static 992 // static
993 int CookiesTreeModel::GetSendForMessageID(const net::CanonicalCookie& cookie) { 993 int CookiesTreeModel::GetSendForMessageID(const net::CanonicalCookie& cookie) {
994 if (cookie.IsSecure()) { 994 if (cookie.IsSecure()) {
995 if (cookie.IsFirstPartyOnly()) 995 if (cookie.IsSameSite())
996 return IDS_COOKIES_COOKIE_SENDFOR_SECURE_FIRSTPARTY; 996 return IDS_COOKIES_COOKIE_SENDFOR_SECURE_SAMESITE;
997 return IDS_COOKIES_COOKIE_SENDFOR_SECURE; 997 return IDS_COOKIES_COOKIE_SENDFOR_SECURE;
998 } 998 }
999 if (cookie.IsFirstPartyOnly()) 999 if (cookie.IsSameSite())
1000 return IDS_COOKIES_COOKIE_SENDFOR_FIRSTPARTY; 1000 return IDS_COOKIES_COOKIE_SENDFOR_SAMESITE;
1001 return IDS_COOKIES_COOKIE_SENDFOR_ANY; 1001 return IDS_COOKIES_COOKIE_SENDFOR_ANY;
1002 } 1002 }
1003 1003
1004 /////////////////////////////////////////////////////////////////////////////// 1004 ///////////////////////////////////////////////////////////////////////////////
1005 // CookiesTreeModel, TreeModel methods (public): 1005 // CookiesTreeModel, TreeModel methods (public):
1006 1006
1007 // TreeModel methods: 1007 // TreeModel methods:
1008 // Returns the set of icons for the nodes in the tree. You only need override 1008 // Returns the set of icons for the nodes in the tree. You only need override
1009 // this if you don't want to use the default folder icons. 1009 // this if you don't want to use the default folder icons.
1010 void CookiesTreeModel::GetIcons(std::vector<gfx::ImageSkia>* icons) { 1010 void CookiesTreeModel::GetIcons(std::vector<gfx::ImageSkia>* icons) {
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 void CookiesTreeModel::MaybeNotifyBatchesEnded() { 1546 void CookiesTreeModel::MaybeNotifyBatchesEnded() {
1547 // Only notify the observers if this is the outermost call to EndBatch() if 1547 // Only notify the observers if this is the outermost call to EndBatch() if
1548 // called in a nested manner. 1548 // called in a nested manner.
1549 if (batches_ended_ == batches_started_ && 1549 if (batches_ended_ == batches_started_ &&
1550 batches_seen_ == batches_expected_) { 1550 batches_seen_ == batches_expected_) {
1551 FOR_EACH_OBSERVER(Observer, 1551 FOR_EACH_OBSERVER(Observer,
1552 cookies_observer_list_, 1552 cookies_observer_list_,
1553 TreeModelEndBatch(this)); 1553 TreeModelEndBatch(this));
1554 } 1554 }
1555 } 1555 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698