| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 node->parent()->parent()); | 168 node->parent()->parent()); |
| 169 CHECK_EQ(host->GetDetailedInfo().node_type, | 169 CHECK_EQ(host->GetDetailedInfo().node_type, |
| 170 CookieTreeNode::DetailedInfo::TYPE_HOST); | 170 CookieTreeNode::DetailedInfo::TYPE_HOST); |
| 171 return node->GetModel()->data_container(); | 171 return node->GetModel()->data_container(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace | 174 } // namespace |
| 175 | 175 |
| 176 CookieTreeNode::DetailedInfo::DetailedInfo() : node_type(TYPE_NONE) {} | 176 CookieTreeNode::DetailedInfo::DetailedInfo() : node_type(TYPE_NONE) {} |
| 177 | 177 |
| 178 CookieTreeNode::DetailedInfo::DetailedInfo(const DetailedInfo& other) = default; |
| 179 |
| 178 CookieTreeNode::DetailedInfo::~DetailedInfo() {} | 180 CookieTreeNode::DetailedInfo::~DetailedInfo() {} |
| 179 | 181 |
| 180 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::Init( | 182 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::Init( |
| 181 NodeType type) { | 183 NodeType type) { |
| 182 DCHECK_EQ(TYPE_NONE, node_type); | 184 DCHECK_EQ(TYPE_NONE, node_type); |
| 183 node_type = type; | 185 node_type = type; |
| 184 return *this; | 186 return *this; |
| 185 } | 187 } |
| 186 | 188 |
| 187 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitHost() { | 189 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitHost() { |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 void CookiesTreeModel::MaybeNotifyBatchesEnded() { | 1548 void CookiesTreeModel::MaybeNotifyBatchesEnded() { |
| 1547 // 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 |
| 1548 // called in a nested manner. | 1550 // called in a nested manner. |
| 1549 if (batches_ended_ == batches_started_ && | 1551 if (batches_ended_ == batches_started_ && |
| 1550 batches_seen_ == batches_expected_) { | 1552 batches_seen_ == batches_expected_) { |
| 1551 FOR_EACH_OBSERVER(Observer, | 1553 FOR_EACH_OBSERVER(Observer, |
| 1552 cookies_observer_list_, | 1554 cookies_observer_list_, |
| 1553 TreeModelEndBatch(this)); | 1555 TreeModelEndBatch(this)); |
| 1554 } | 1556 } |
| 1555 } | 1557 } |
| OLD | NEW |