| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 appcache_info_(appcache_info) { | 306 appcache_info_(appcache_info) { |
| 307 } | 307 } |
| 308 | 308 |
| 309 CookieTreeAppCacheNode::~CookieTreeAppCacheNode() { | 309 CookieTreeAppCacheNode::~CookieTreeAppCacheNode() { |
| 310 } | 310 } |
| 311 | 311 |
| 312 void CookieTreeAppCacheNode::DeleteStoredObjects() { | 312 void CookieTreeAppCacheNode::DeleteStoredObjects() { |
| 313 LocalDataContainer* container = GetLocalDataContainerForNode(this); | 313 LocalDataContainer* container = GetLocalDataContainerForNode(this); |
| 314 | 314 |
| 315 if (container) { | 315 if (container) { |
| 316 DCHECK(container->appcache_helper_); | 316 DCHECK(container->appcache_helper_.get()); |
| 317 container->appcache_helper_->DeleteAppCacheGroup( | 317 container->appcache_helper_ |
| 318 appcache_info_->manifest_url); | 318 ->DeleteAppCacheGroup(appcache_info_->manifest_url); |
| 319 container->appcache_info_[origin_url_].erase(appcache_info_); | 319 container->appcache_info_[origin_url_].erase(appcache_info_); |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 | 322 |
| 323 CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const { | 323 CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const { |
| 324 return DetailedInfo().InitAppCache(origin_url_, &*appcache_info_); | 324 return DetailedInfo().InitAppCache(origin_url_, &*appcache_info_); |
| 325 } | 325 } |
| 326 | 326 |
| 327 /////////////////////////////////////////////////////////////////////////////// | 327 /////////////////////////////////////////////////////////////////////////////// |
| 328 // CookieTreeDatabaseNode, public: | 328 // CookieTreeDatabaseNode, public: |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 PopulateSessionStorageInfoWithFilter(data_container(), ¬ifier, filter); | 952 PopulateSessionStorageInfoWithFilter(data_container(), ¬ifier, filter); |
| 953 PopulateAppCacheInfoWithFilter(data_container(), ¬ifier, filter); | 953 PopulateAppCacheInfoWithFilter(data_container(), ¬ifier, filter); |
| 954 PopulateIndexedDBInfoWithFilter(data_container(), ¬ifier, filter); | 954 PopulateIndexedDBInfoWithFilter(data_container(), ¬ifier, filter); |
| 955 PopulateFileSystemInfoWithFilter(data_container(), ¬ifier, filter); | 955 PopulateFileSystemInfoWithFilter(data_container(), ¬ifier, filter); |
| 956 PopulateQuotaInfoWithFilter(data_container(), ¬ifier, filter); | 956 PopulateQuotaInfoWithFilter(data_container(), ¬ifier, filter); |
| 957 PopulateServerBoundCertInfoWithFilter(data_container(), ¬ifier, filter); | 957 PopulateServerBoundCertInfoWithFilter(data_container(), ¬ifier, filter); |
| 958 } | 958 } |
| 959 | 959 |
| 960 const ExtensionSet* CookiesTreeModel::ExtensionsProtectingNode( | 960 const ExtensionSet* CookiesTreeModel::ExtensionsProtectingNode( |
| 961 const CookieTreeNode& cookie_node) { | 961 const CookieTreeNode& cookie_node) { |
| 962 if (!special_storage_policy_) | 962 if (!special_storage_policy_.get()) |
| 963 return NULL; | 963 return NULL; |
| 964 | 964 |
| 965 CookieTreeNode::DetailedInfo info = cookie_node.GetDetailedInfo(); | 965 CookieTreeNode::DetailedInfo info = cookie_node.GetDetailedInfo(); |
| 966 | 966 |
| 967 if (!TypeIsProtected(info.node_type)) | 967 if (!TypeIsProtected(info.node_type)) |
| 968 return NULL; | 968 return NULL; |
| 969 | 969 |
| 970 DCHECK(!info.origin.is_empty()); | 970 DCHECK(!info.origin.is_empty()); |
| 971 return special_storage_policy_->ExtensionsProtectingOrigin(info.origin); | 971 return special_storage_policy_->ExtensionsProtectingOrigin(info.origin); |
| 972 } | 972 } |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 | 1328 |
| 1329 void CookiesTreeModel::NotifyObserverEndBatch() { | 1329 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 1330 // Only notify the observers if this is the outermost call to EndBatch() if | 1330 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1331 // called in a nested manner. | 1331 // called in a nested manner. |
| 1332 if (--batch_update_ == 0) { | 1332 if (--batch_update_ == 0) { |
| 1333 FOR_EACH_OBSERVER(Observer, | 1333 FOR_EACH_OBSERVER(Observer, |
| 1334 cookies_observer_list_, | 1334 cookies_observer_list_, |
| 1335 TreeModelEndBatch(this)); | 1335 TreeModelEndBatch(this)); |
| 1336 } | 1336 } |
| 1337 } | 1337 } |
| OLD | NEW |