| 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_SAME_SITE; |
| 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_SAME_SITE; |
| 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 Loading... |
| 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 } |
| OLD | NEW |