| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitAppCache( | 212 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitAppCache( |
| 213 const GURL& origin, | 213 const GURL& origin, |
| 214 const appcache::AppCacheInfo* appcache_info) { | 214 const appcache::AppCacheInfo* appcache_info) { |
| 215 Init(TYPE_APPCACHE); | 215 Init(TYPE_APPCACHE); |
| 216 this->appcache_info = appcache_info; | 216 this->appcache_info = appcache_info; |
| 217 this->origin = origin; | 217 this->origin = origin; |
| 218 return *this; | 218 return *this; |
| 219 } | 219 } |
| 220 | 220 |
| 221 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitIndexedDB( | 221 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitIndexedDB( |
| 222 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) { | 222 const content::IndexedDBInfo* indexed_db_info) { |
| 223 Init(TYPE_INDEXED_DB); | 223 Init(TYPE_INDEXED_DB); |
| 224 this->indexed_db_info = indexed_db_info; | 224 this->indexed_db_info = indexed_db_info; |
| 225 this->origin = indexed_db_info->origin; | 225 this->origin = indexed_db_info->origin; |
| 226 return *this; | 226 return *this; |
| 227 } | 227 } |
| 228 | 228 |
| 229 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitFileSystem( | 229 CookieTreeNode::DetailedInfo& CookieTreeNode::DetailedInfo::InitFileSystem( |
| 230 const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info) { | 230 const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info) { |
| 231 Init(TYPE_FILE_SYSTEM); | 231 Init(TYPE_FILE_SYSTEM); |
| 232 this->file_system_info = file_system_info; | 232 this->file_system_info = file_system_info; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 CookieTreeNode::DetailedInfo | 400 CookieTreeNode::DetailedInfo |
| 401 CookieTreeSessionStorageNode::GetDetailedInfo() const { | 401 CookieTreeSessionStorageNode::GetDetailedInfo() const { |
| 402 return DetailedInfo().InitSessionStorage(&*session_storage_info_); | 402 return DetailedInfo().InitSessionStorage(&*session_storage_info_); |
| 403 } | 403 } |
| 404 | 404 |
| 405 /////////////////////////////////////////////////////////////////////////////// | 405 /////////////////////////////////////////////////////////////////////////////// |
| 406 // CookieTreeIndexedDBNode, public: | 406 // CookieTreeIndexedDBNode, public: |
| 407 | 407 |
| 408 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( | 408 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( |
| 409 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator | 409 std::list<content::IndexedDBInfo>::iterator |
| 410 indexed_db_info) | 410 indexed_db_info) |
| 411 : CookieTreeNode(UTF8ToUTF16( | 411 : CookieTreeNode(UTF8ToUTF16( |
| 412 indexed_db_info->origin.spec())), | 412 indexed_db_info->origin.spec())), |
| 413 indexed_db_info_(indexed_db_info) { | 413 indexed_db_info_(indexed_db_info) { |
| 414 } | 414 } |
| 415 | 415 |
| 416 CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {} | 416 CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {} |
| 417 | 417 |
| 418 void CookieTreeIndexedDBNode::DeleteStoredObjects() { | 418 void CookieTreeIndexedDBNode::DeleteStoredObjects() { |
| 419 LocalDataContainer* container = GetLocalDataContainerForNode(this); | 419 LocalDataContainer* container = GetLocalDataContainerForNode(this); |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1327 |
| 1328 void CookiesTreeModel::NotifyObserverEndBatch() { | 1328 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 1329 // Only notify the observers if this is the outermost call to EndBatch() if | 1329 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1330 // called in a nested manner. | 1330 // called in a nested manner. |
| 1331 if (--batch_update_ == 0) { | 1331 if (--batch_update_ == 0) { |
| 1332 FOR_EACH_OBSERVER(Observer, | 1332 FOR_EACH_OBSERVER(Observer, |
| 1333 cookies_observer_list_, | 1333 cookies_observer_list_, |
| 1334 TreeModelEndBatch(this)); | 1334 TreeModelEndBatch(this)); |
| 1335 } | 1335 } |
| 1336 } | 1336 } |
| OLD | NEW |