| OLD | NEW |
| 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 group_by_cookie_source_(group_by_cookie_source) { | 987 group_by_cookie_source_(group_by_cookie_source) { |
| 988 data_container_->Init(this); | 988 data_container_->Init(this); |
| 989 } | 989 } |
| 990 | 990 |
| 991 CookiesTreeModel::~CookiesTreeModel() { | 991 CookiesTreeModel::~CookiesTreeModel() { |
| 992 } | 992 } |
| 993 | 993 |
| 994 // static | 994 // static |
| 995 int CookiesTreeModel::GetSendForMessageID(const net::CanonicalCookie& cookie) { | 995 int CookiesTreeModel::GetSendForMessageID(const net::CanonicalCookie& cookie) { |
| 996 if (cookie.IsSecure()) { | 996 if (cookie.IsSecure()) { |
| 997 if (cookie.IsSameSite()) | 997 if (cookie.SameSite() != net::CookieSameSite::NO_RESTRICTION) |
| 998 return IDS_COOKIES_COOKIE_SENDFOR_SECURE_SAME_SITE; | 998 return IDS_COOKIES_COOKIE_SENDFOR_SECURE_SAME_SITE; |
| 999 return IDS_COOKIES_COOKIE_SENDFOR_SECURE; | 999 return IDS_COOKIES_COOKIE_SENDFOR_SECURE; |
| 1000 } | 1000 } |
| 1001 if (cookie.IsSameSite()) | 1001 if (cookie.SameSite() != net::CookieSameSite::NO_RESTRICTION) |
| 1002 return IDS_COOKIES_COOKIE_SENDFOR_SAME_SITE; | 1002 return IDS_COOKIES_COOKIE_SENDFOR_SAME_SITE; |
| 1003 return IDS_COOKIES_COOKIE_SENDFOR_ANY; | 1003 return IDS_COOKIES_COOKIE_SENDFOR_ANY; |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 /////////////////////////////////////////////////////////////////////////////// | 1006 /////////////////////////////////////////////////////////////////////////////// |
| 1007 // CookiesTreeModel, TreeModel methods (public): | 1007 // CookiesTreeModel, TreeModel methods (public): |
| 1008 | 1008 |
| 1009 // TreeModel methods: | 1009 // TreeModel methods: |
| 1010 // Returns the set of icons for the nodes in the tree. You only need override | 1010 // Returns the set of icons for the nodes in the tree. You only need override |
| 1011 // this if you don't want to use the default folder icons. | 1011 // this if you don't want to use the default folder icons. |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 void CookiesTreeModel::MaybeNotifyBatchesEnded() { | 1548 void CookiesTreeModel::MaybeNotifyBatchesEnded() { |
| 1549 // Only notify the observers if this is the outermost call to EndBatch() if | 1549 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1550 // called in a nested manner. | 1550 // called in a nested manner. |
| 1551 if (batches_ended_ == batches_started_ && | 1551 if (batches_ended_ == batches_started_ && |
| 1552 batches_seen_ == batches_expected_) { | 1552 batches_seen_ == batches_expected_) { |
| 1553 FOR_EACH_OBSERVER(Observer, | 1553 FOR_EACH_OBSERVER(Observer, |
| 1554 cookies_observer_list_, | 1554 cookies_observer_list_, |
| 1555 TreeModelEndBatch(this)); | 1555 TreeModelEndBatch(this)); |
| 1556 } | 1556 } |
| 1557 } | 1557 } |
| OLD | NEW |