Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cookies_tree_model.h" | 5 #include "chrome/browser/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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 if (parent()) | 42 if (parent()) |
| 43 return parent()->GetModel(); | 43 return parent()->GetModel(); |
| 44 else | 44 else |
| 45 return NULL; | 45 return NULL; |
| 46 } | 46 } |
| 47 | 47 |
| 48 /////////////////////////////////////////////////////////////////////////////// | 48 /////////////////////////////////////////////////////////////////////////////// |
| 49 // CookieTreeCookieNode, public: | 49 // CookieTreeCookieNode, public: |
| 50 | 50 |
| 51 CookieTreeCookieNode::CookieTreeCookieNode( | 51 CookieTreeCookieNode::CookieTreeCookieNode( |
| 52 net::CookieMonster::CanonicalCookie* cookie) | 52 std::list<net::CookieMonster::CanonicalCookie>::iterator cookie) |
| 53 : CookieTreeNode(UTF8ToUTF16(cookie->Name())), | 53 : CookieTreeNode(UTF8ToUTF16(cookie->Name())), |
| 54 cookie_(cookie) { | 54 cookie_(cookie) { |
| 55 } | 55 } |
| 56 | 56 |
| 57 CookieTreeCookieNode::~CookieTreeCookieNode() {} | 57 CookieTreeCookieNode::~CookieTreeCookieNode() {} |
| 58 | 58 |
| 59 void CookieTreeCookieNode::DeleteStoredObjects() { | 59 void CookieTreeCookieNode::DeleteStoredObjects() { |
| 60 // notify CookieMonster that we should delete this cookie | 60 // notify CookieMonster that we should delete this cookie |
| 61 // We have stored a copy of all the cookies in the model, and our model is | 61 // We have stored a copy of all the cookies in the model, and our model is |
| 62 // never re-calculated. Thus, we just need to delete the nodes from our | 62 // never re-calculated. Thus, we just need to delete the nodes from our |
| 63 // model, and tell CookieMonster to delete the cookies. We can keep the | 63 // model, and tell CookieMonster to delete the cookies. We can keep the |
| 64 // vector storing the cookies in-tact and not delete from there (that would | 64 // vector storing the cookies in-tact and not delete from there (that would |
| 65 // invalidate our pointers), and the fact that it contains semi out-of-date | 65 // invalidate our pointers), and the fact that it contains semi out-of-date |
| 66 // data is not problematic as we don't re-build the model based on that. | 66 // data is not problematic as we don't re-build the model based on that. |
|
Bernhard Bauer
2011/08/17 13:34:36
Is this comment still up to date?
| |
| 67 GetModel()->cookie_helper_->DeleteCookie(*cookie_); | 67 GetModel()->cookie_helper_->DeleteCookie(*cookie_); |
| 68 GetModel()->cookie_list_.erase(cookie_); | |
| 68 } | 69 } |
| 69 | 70 |
| 70 CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const { | 71 CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const { |
| 71 return DetailedInfo(parent()->parent()->GetTitle(), | 72 return DetailedInfo(parent()->parent()->GetTitle(), |
| 72 DetailedInfo::TYPE_COOKIE, | 73 DetailedInfo::TYPE_COOKIE, |
| 73 cookie_, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | 74 &*cookie_, NULL, NULL, NULL, NULL, NULL, NULL, NULL); |
| 74 } | 75 } |
| 75 | 76 |
| 76 namespace { | 77 namespace { |
| 77 // comparison functor, for use in CookieTreeRootNode | 78 // comparison functor, for use in CookieTreeRootNode |
| 78 class OriginNodeComparator { | 79 class OriginNodeComparator { |
| 79 public: | 80 public: |
| 80 bool operator() (const CookieTreeNode* lhs, | 81 bool operator() (const CookieTreeNode* lhs, |
| 81 const CookieTreeNode* rhs) { | 82 const CookieTreeNode* rhs) { |
| 82 // We want to order by registry controlled domain, so we would get | 83 // We want to order by registry controlled domain, so we would get |
| 83 // google.com, ad.google.com, www.google.com, | 84 // google.com, ad.google.com, www.google.com, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 return retval; | 130 return retval; |
| 130 } | 131 } |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace | 134 } // namespace |
| 134 | 135 |
| 135 /////////////////////////////////////////////////////////////////////////////// | 136 /////////////////////////////////////////////////////////////////////////////// |
| 136 // CookieTreeAppCacheNode, public: | 137 // CookieTreeAppCacheNode, public: |
| 137 | 138 |
| 138 CookieTreeAppCacheNode::CookieTreeAppCacheNode( | 139 CookieTreeAppCacheNode::CookieTreeAppCacheNode( |
| 139 const appcache::AppCacheInfo* appcache_info) | 140 const GURL& origin_url, |
| 141 std::list<appcache::AppCacheInfo>::iterator appcache_info) | |
| 140 : CookieTreeNode(UTF8ToUTF16(appcache_info->manifest_url.spec())), | 142 : CookieTreeNode(UTF8ToUTF16(appcache_info->manifest_url.spec())), |
| 143 origin_url_(origin_url), | |
| 141 appcache_info_(appcache_info) { | 144 appcache_info_(appcache_info) { |
| 142 } | 145 } |
| 143 | 146 |
| 144 void CookieTreeAppCacheNode::DeleteStoredObjects() { | 147 void CookieTreeAppCacheNode::DeleteStoredObjects() { |
| 145 DCHECK(GetModel()->appcache_helper_); | 148 DCHECK(GetModel()->appcache_helper_); |
| 146 GetModel()->appcache_helper_->DeleteAppCacheGroup( | 149 GetModel()->appcache_helper_->DeleteAppCacheGroup( |
| 147 appcache_info_->manifest_url); | 150 appcache_info_->manifest_url); |
| 151 GetModel()->appcache_info_[origin_url_].erase(appcache_info_); | |
| 148 } | 152 } |
| 149 | 153 |
| 150 CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const { | 154 CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const { |
| 151 return DetailedInfo(parent()->parent()->GetTitle(), | 155 return DetailedInfo(parent()->parent()->GetTitle(), |
| 152 DetailedInfo::TYPE_APPCACHE, | 156 DetailedInfo::TYPE_APPCACHE, |
| 153 NULL, NULL, NULL, NULL, appcache_info_, NULL, NULL, NULL); | 157 NULL, NULL, NULL, NULL, &*appcache_info_, |
| 158 NULL, NULL, NULL); | |
| 154 } | 159 } |
| 155 | 160 |
| 156 /////////////////////////////////////////////////////////////////////////////// | 161 /////////////////////////////////////////////////////////////////////////////// |
| 157 // CookieTreeDatabaseNode, public: | 162 // CookieTreeDatabaseNode, public: |
| 158 | 163 |
| 159 CookieTreeDatabaseNode::CookieTreeDatabaseNode( | 164 CookieTreeDatabaseNode::CookieTreeDatabaseNode( |
| 160 BrowsingDataDatabaseHelper::DatabaseInfo* database_info) | 165 std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator database_info) |
| 161 : CookieTreeNode(database_info->database_name.empty() ? | 166 : CookieTreeNode(database_info->database_name.empty() ? |
| 162 l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) : | 167 l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) : |
| 163 UTF8ToUTF16(database_info->database_name)), | 168 UTF8ToUTF16(database_info->database_name)), |
| 164 database_info_(database_info) { | 169 database_info_(database_info) { |
| 165 } | 170 } |
| 166 | 171 |
| 167 CookieTreeDatabaseNode::~CookieTreeDatabaseNode() {} | 172 CookieTreeDatabaseNode::~CookieTreeDatabaseNode() {} |
| 168 | 173 |
| 169 void CookieTreeDatabaseNode::DeleteStoredObjects() { | 174 void CookieTreeDatabaseNode::DeleteStoredObjects() { |
| 170 GetModel()->database_helper_->DeleteDatabase( | 175 GetModel()->database_helper_->DeleteDatabase( |
| 171 database_info_->origin_identifier, database_info_->database_name); | 176 database_info_->origin_identifier, database_info_->database_name); |
| 177 GetModel()->database_info_list_.erase(database_info_); | |
| 172 } | 178 } |
| 173 | 179 |
| 174 CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const { | 180 CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const { |
| 175 return DetailedInfo(parent()->parent()->GetTitle(), | 181 return DetailedInfo(parent()->parent()->GetTitle(), |
| 176 DetailedInfo::TYPE_DATABASE, | 182 DetailedInfo::TYPE_DATABASE, |
| 177 NULL, database_info_, NULL, NULL, NULL, NULL, NULL, NULL); | 183 NULL, &*database_info_, |
| 184 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 178 } | 185 } |
| 179 | 186 |
| 180 /////////////////////////////////////////////////////////////////////////////// | 187 /////////////////////////////////////////////////////////////////////////////// |
| 181 // CookieTreeLocalStorageNode, public: | 188 // CookieTreeLocalStorageNode, public: |
| 182 | 189 |
| 183 CookieTreeLocalStorageNode::CookieTreeLocalStorageNode( | 190 CookieTreeLocalStorageNode::CookieTreeLocalStorageNode( |
| 184 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info) | 191 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 192 local_storage_info) | |
| 185 : CookieTreeNode(UTF8ToUTF16( | 193 : CookieTreeNode(UTF8ToUTF16( |
| 186 local_storage_info->origin.empty() ? | 194 local_storage_info->origin.empty() ? |
| 187 local_storage_info->database_identifier : | 195 local_storage_info->database_identifier : |
| 188 local_storage_info->origin)), | 196 local_storage_info->origin)), |
| 189 local_storage_info_(local_storage_info) { | 197 local_storage_info_(local_storage_info) { |
| 190 } | 198 } |
| 191 | 199 |
| 192 CookieTreeLocalStorageNode::~CookieTreeLocalStorageNode() {} | 200 CookieTreeLocalStorageNode::~CookieTreeLocalStorageNode() {} |
| 193 | 201 |
| 194 void CookieTreeLocalStorageNode::DeleteStoredObjects() { | 202 void CookieTreeLocalStorageNode::DeleteStoredObjects() { |
| 195 GetModel()->local_storage_helper_->DeleteLocalStorageFile( | 203 GetModel()->local_storage_helper_->DeleteLocalStorageFile( |
| 196 local_storage_info_->file_path); | 204 local_storage_info_->file_path); |
| 205 GetModel()->local_storage_info_list_.erase(local_storage_info_); | |
| 197 } | 206 } |
| 198 | 207 |
| 199 CookieTreeNode::DetailedInfo | 208 CookieTreeNode::DetailedInfo |
| 200 CookieTreeLocalStorageNode::GetDetailedInfo() const { | 209 CookieTreeLocalStorageNode::GetDetailedInfo() const { |
| 201 return DetailedInfo(parent()->parent()->GetTitle(), | 210 return DetailedInfo(parent()->parent()->GetTitle(), |
| 202 DetailedInfo::TYPE_LOCAL_STORAGE, | 211 DetailedInfo::TYPE_LOCAL_STORAGE, |
| 203 NULL, NULL, local_storage_info_, NULL, NULL, NULL, NULL, | 212 NULL, NULL, &*local_storage_info_, NULL, NULL, NULL, NULL, |
| 204 NULL); | 213 NULL); |
| 205 } | 214 } |
| 206 | 215 |
| 207 /////////////////////////////////////////////////////////////////////////////// | 216 /////////////////////////////////////////////////////////////////////////////// |
| 208 // CookieTreeSessionStorageNode, public: | 217 // CookieTreeSessionStorageNode, public: |
| 209 | 218 |
| 210 CookieTreeSessionStorageNode::CookieTreeSessionStorageNode( | 219 CookieTreeSessionStorageNode::CookieTreeSessionStorageNode( |
| 211 BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info) | 220 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 221 session_storage_info) | |
| 212 : CookieTreeNode(UTF8ToUTF16( | 222 : CookieTreeNode(UTF8ToUTF16( |
| 213 session_storage_info->origin.empty() ? | 223 session_storage_info->origin.empty() ? |
| 214 session_storage_info->database_identifier : | 224 session_storage_info->database_identifier : |
| 215 session_storage_info->origin)), | 225 session_storage_info->origin)), |
| 216 session_storage_info_(session_storage_info) { | 226 session_storage_info_(session_storage_info) { |
| 217 } | 227 } |
| 218 | 228 |
| 219 CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {} | 229 CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {} |
| 220 | 230 |
| 231 void CookieTreeSessionStorageNode::DeleteStoredObjects() { | |
| 232 GetModel()->session_storage_info_list_.erase(session_storage_info_); | |
| 233 } | |
| 234 | |
| 221 CookieTreeNode::DetailedInfo | 235 CookieTreeNode::DetailedInfo |
| 222 CookieTreeSessionStorageNode::GetDetailedInfo() const { | 236 CookieTreeSessionStorageNode::GetDetailedInfo() const { |
| 223 return DetailedInfo(parent()->parent()->GetTitle(), | 237 return DetailedInfo(parent()->parent()->GetTitle(), |
| 224 DetailedInfo::TYPE_SESSION_STORAGE, | 238 DetailedInfo::TYPE_SESSION_STORAGE, |
| 225 NULL, NULL, NULL, session_storage_info_, NULL, NULL, | 239 NULL, NULL, NULL, &*session_storage_info_, NULL, NULL, |
| 226 NULL, NULL); | 240 NULL, NULL); |
| 227 } | 241 } |
| 228 | 242 |
| 229 /////////////////////////////////////////////////////////////////////////////// | 243 /////////////////////////////////////////////////////////////////////////////// |
| 230 // CookieTreeIndexedDBNode, public: | 244 // CookieTreeIndexedDBNode, public: |
| 231 | 245 |
| 232 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( | 246 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( |
| 233 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) | 247 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator |
| 248 indexed_db_info) | |
| 234 : CookieTreeNode(UTF8ToUTF16( | 249 : CookieTreeNode(UTF8ToUTF16( |
| 235 indexed_db_info->origin.empty() ? | 250 indexed_db_info->origin.empty() ? |
| 236 indexed_db_info->database_identifier : | 251 indexed_db_info->database_identifier : |
| 237 indexed_db_info->origin)), | 252 indexed_db_info->origin)), |
| 238 indexed_db_info_(indexed_db_info) { | 253 indexed_db_info_(indexed_db_info) { |
| 239 } | 254 } |
| 240 | 255 |
| 241 CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {} | 256 CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {} |
| 242 | 257 |
| 243 void CookieTreeIndexedDBNode::DeleteStoredObjects() { | 258 void CookieTreeIndexedDBNode::DeleteStoredObjects() { |
| 244 GetModel()->indexed_db_helper_->DeleteIndexedDBFile( | 259 GetModel()->indexed_db_helper_->DeleteIndexedDBFile( |
| 245 indexed_db_info_->file_path); | 260 indexed_db_info_->file_path); |
| 261 GetModel()->indexed_db_info_list_.erase(indexed_db_info_); | |
| 246 } | 262 } |
| 247 | 263 |
| 248 CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const { | 264 CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const { |
| 249 return DetailedInfo(parent()->parent()->GetTitle(), | 265 return DetailedInfo(parent()->parent()->GetTitle(), |
| 250 DetailedInfo::TYPE_INDEXED_DB, | 266 DetailedInfo::TYPE_INDEXED_DB, |
| 251 NULL, NULL, NULL, NULL, NULL, indexed_db_info_, NULL, | 267 NULL, NULL, NULL, NULL, NULL, &*indexed_db_info_, NULL, |
| 252 NULL); | 268 NULL); |
| 253 } | 269 } |
| 254 | 270 |
| 255 /////////////////////////////////////////////////////////////////////////////// | 271 /////////////////////////////////////////////////////////////////////////////// |
| 256 // CookieTreeFileSystemNode, public: | 272 // CookieTreeFileSystemNode, public: |
| 257 | 273 |
| 258 CookieTreeFileSystemNode::CookieTreeFileSystemNode( | 274 CookieTreeFileSystemNode::CookieTreeFileSystemNode( |
| 259 BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info) | 275 std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator |
| 276 file_system_info) | |
| 260 : CookieTreeNode(UTF8ToUTF16( | 277 : CookieTreeNode(UTF8ToUTF16( |
| 261 file_system_info->origin.spec())), | 278 file_system_info->origin.spec())), |
| 262 file_system_info_(file_system_info) { | 279 file_system_info_(file_system_info) { |
| 263 } | 280 } |
| 264 | 281 |
| 265 CookieTreeFileSystemNode::~CookieTreeFileSystemNode() {} | 282 CookieTreeFileSystemNode::~CookieTreeFileSystemNode() {} |
| 266 | 283 |
| 267 void CookieTreeFileSystemNode::DeleteStoredObjects() { | 284 void CookieTreeFileSystemNode::DeleteStoredObjects() { |
| 268 GetModel()->file_system_helper_->DeleteFileSystemOrigin( | 285 GetModel()->file_system_helper_->DeleteFileSystemOrigin( |
| 269 file_system_info_->origin); | 286 file_system_info_->origin); |
| 287 GetModel()->file_system_info_list_.erase(file_system_info_); | |
| 270 } | 288 } |
| 271 | 289 |
| 272 CookieTreeNode::DetailedInfo CookieTreeFileSystemNode::GetDetailedInfo() const { | 290 CookieTreeNode::DetailedInfo CookieTreeFileSystemNode::GetDetailedInfo() const { |
| 273 return DetailedInfo(parent()->parent()->GetTitle(), | 291 return DetailedInfo(parent()->parent()->GetTitle(), |
| 274 DetailedInfo::TYPE_FILE_SYSTEM, | 292 DetailedInfo::TYPE_FILE_SYSTEM, |
| 275 NULL, NULL, NULL, NULL, NULL, NULL, file_system_info_, | 293 NULL, NULL, NULL, NULL, NULL, NULL, &*file_system_info_, |
| 276 NULL); | 294 NULL); |
| 277 } | 295 } |
| 278 | 296 |
| 279 /////////////////////////////////////////////////////////////////////////////// | 297 /////////////////////////////////////////////////////////////////////////////// |
| 280 // CookieTreeQuotaNode, public: | 298 // CookieTreeQuotaNode, public: |
| 281 | 299 |
| 282 CookieTreeQuotaNode::CookieTreeQuotaNode( | 300 CookieTreeQuotaNode::CookieTreeQuotaNode( |
| 283 BrowsingDataQuotaHelper::QuotaInfo* quota_info) | 301 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info) |
| 284 : CookieTreeNode(UTF8ToUTF16(quota_info->host)), | 302 : CookieTreeNode(UTF8ToUTF16(quota_info->host)), |
| 285 quota_info_(quota_info) { | 303 quota_info_(quota_info) { |
| 286 } | 304 } |
| 287 | 305 |
| 288 CookieTreeQuotaNode::~CookieTreeQuotaNode() {} | 306 CookieTreeQuotaNode::~CookieTreeQuotaNode() {} |
| 289 | 307 |
| 290 void CookieTreeQuotaNode::DeleteStoredObjects() { | 308 void CookieTreeQuotaNode::DeleteStoredObjects() { |
| 291 GetModel()->quota_helper_->DeleteQuotaHost(quota_info_->host); | 309 GetModel()->quota_helper_->DeleteQuotaHost(quota_info_->host); |
| 310 GetModel()->quota_info_list_.erase(quota_info_); | |
| 292 } | 311 } |
| 293 | 312 |
| 294 CookieTreeNode::DetailedInfo CookieTreeQuotaNode::GetDetailedInfo() const { | 313 CookieTreeNode::DetailedInfo CookieTreeQuotaNode::GetDetailedInfo() const { |
| 295 return DetailedInfo(parent()->parent()->GetTitle(), | 314 return DetailedInfo(parent()->parent()->GetTitle(), |
| 296 DetailedInfo::TYPE_QUOTA, | 315 DetailedInfo::TYPE_QUOTA, |
| 297 NULL, NULL, NULL, NULL, NULL, NULL, NULL, quota_info_); | 316 NULL, NULL, NULL, NULL, NULL, NULL, NULL, &*quota_info_); |
| 298 } | 317 } |
| 299 | 318 |
| 300 /////////////////////////////////////////////////////////////////////////////// | 319 /////////////////////////////////////////////////////////////////////////////// |
| 301 // CookieTreeRootNode, public: | 320 // CookieTreeRootNode, public: |
| 302 | 321 |
| 303 CookieTreeRootNode::CookieTreeRootNode(CookiesTreeModel* model) | 322 CookieTreeRootNode::CookieTreeRootNode(CookiesTreeModel* model) |
| 304 : model_(model) { | 323 : model_(model) { |
| 305 } | 324 } |
| 306 | 325 |
| 307 CookieTreeRootNode::~CookieTreeRootNode() {} | 326 CookieTreeRootNode::~CookieTreeRootNode() {} |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 | 439 |
| 421 CookieTreeFileSystemsNode* CookieTreeOriginNode::GetOrCreateFileSystemsNode() { | 440 CookieTreeFileSystemsNode* CookieTreeOriginNode::GetOrCreateFileSystemsNode() { |
| 422 if (file_systems_child_) | 441 if (file_systems_child_) |
| 423 return file_systems_child_; | 442 return file_systems_child_; |
| 424 file_systems_child_ = new CookieTreeFileSystemsNode; | 443 file_systems_child_ = new CookieTreeFileSystemsNode; |
| 425 AddChildSortedByTitle(file_systems_child_); | 444 AddChildSortedByTitle(file_systems_child_); |
| 426 return file_systems_child_; | 445 return file_systems_child_; |
| 427 } | 446 } |
| 428 | 447 |
| 429 CookieTreeQuotaNode* CookieTreeOriginNode::UpdateOrCreateQuotaNode( | 448 CookieTreeQuotaNode* CookieTreeOriginNode::UpdateOrCreateQuotaNode( |
| 430 BrowsingDataQuotaHelper::QuotaInfo* quota_info) { | 449 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info) { |
| 431 if (quota_child_) | 450 if (quota_child_) |
| 432 return quota_child_; | 451 return quota_child_; |
| 433 quota_child_ = new CookieTreeQuotaNode(quota_info); | 452 quota_child_ = new CookieTreeQuotaNode(quota_info); |
| 434 AddChildSortedByTitle(quota_child_); | 453 AddChildSortedByTitle(quota_child_); |
| 435 return quota_child_; | 454 return quota_child_; |
| 436 } | 455 } |
| 437 | 456 |
| 438 void CookieTreeOriginNode::CreateContentException( | 457 void CookieTreeOriginNode::CreateContentException( |
| 439 HostContentSettingsMap* content_settings, ContentSetting setting) const { | 458 HostContentSettingsMap* content_settings, ContentSetting setting) const { |
| 440 if (CanCreateContentException()) { | 459 if (CanCreateContentException()) { |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 752 ui::TreeNodeModel<CookieTreeNode>::AddObserver(observer); | 771 ui::TreeNodeModel<CookieTreeNode>::AddObserver(observer); |
| 753 } | 772 } |
| 754 | 773 |
| 755 void CookiesTreeModel::RemoveCookiesTreeObserver(Observer* observer) { | 774 void CookiesTreeModel::RemoveCookiesTreeObserver(Observer* observer) { |
| 756 cookies_observer_list_.RemoveObserver(observer); | 775 cookies_observer_list_.RemoveObserver(observer); |
| 757 // Call super so that TreeNodeModel doesn't have dead pointers. | 776 // Call super so that TreeNodeModel doesn't have dead pointers. |
| 758 ui::TreeNodeModel<CookieTreeNode>::RemoveObserver(observer); | 777 ui::TreeNodeModel<CookieTreeNode>::RemoveObserver(observer); |
| 759 } | 778 } |
| 760 | 779 |
| 761 void CookiesTreeModel::OnAppCacheModelInfoLoaded() { | 780 void CookiesTreeModel::OnAppCacheModelInfoLoaded() { |
| 762 appcache_info_ = appcache_helper_->info_collection(); | 781 using appcache::AppCacheInfo; |
| 782 using appcache::AppCacheInfoCollection; | |
| 783 using appcache::AppCacheInfoVector; | |
| 784 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; | |
| 785 | |
| 786 scoped_refptr<AppCacheInfoCollection> appcache_info = | |
| 787 appcache_helper_->info_collection(); | |
| 788 if (!appcache_info || appcache_info->infos_by_origin.empty()) | |
| 789 return; | |
| 790 | |
| 791 for (InfoByOrigin::const_iterator origin = | |
| 792 appcache_info->infos_by_origin.begin(); | |
| 793 origin != appcache_info->infos_by_origin.end(); ++origin) { | |
| 794 std::list<AppCacheInfo>& info_list = appcache_info_[origin->first]; | |
| 795 info_list.insert( | |
| 796 info_list.begin(), origin->second.begin(), origin->second.end()); | |
| 797 } | |
| 798 | |
| 763 PopulateAppCacheInfoWithFilter(std::wstring()); | 799 PopulateAppCacheInfoWithFilter(std::wstring()); |
| 764 } | 800 } |
| 765 | 801 |
| 766 void CookiesTreeModel::PopulateAppCacheInfoWithFilter( | 802 void CookiesTreeModel::PopulateAppCacheInfoWithFilter( |
| 767 const std::wstring& filter) { | 803 const std::wstring& filter) { |
| 768 using appcache::AppCacheInfo; | 804 using appcache::AppCacheInfo; |
| 769 using appcache::AppCacheInfoVector; | 805 typedef std::map<GURL, std::list<AppCacheInfo> > InfoByOrigin; |
| 770 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; | |
| 771 | 806 |
| 772 if (!appcache_info_ || appcache_info_->infos_by_origin.empty()) | 807 if (appcache_info_.empty()) |
| 773 return; | 808 return; |
| 774 | 809 |
| 775 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); | 810 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); |
| 776 NotifyObserverBeginBatch(); | 811 NotifyObserverBeginBatch(); |
| 777 for (InfoByOrigin::const_iterator origin = | 812 for (InfoByOrigin::iterator origin = appcache_info_.begin(); |
| 778 appcache_info_->infos_by_origin.begin(); | 813 origin != appcache_info_.end(); ++origin) { |
| 779 origin != appcache_info_->infos_by_origin.end(); ++origin) { | |
| 780 std::wstring origin_node_name = UTF8ToWide(origin->first.host()); | 814 std::wstring origin_node_name = UTF8ToWide(origin->first.host()); |
| 781 if (filter.empty() || | 815 if (filter.empty() || |
| 782 (origin_node_name.find(filter) != std::wstring::npos)) { | 816 (origin_node_name.find(filter) != std::wstring::npos)) { |
| 783 CookieTreeOriginNode* origin_node = | 817 CookieTreeOriginNode* origin_node = |
| 784 root->GetOrCreateOriginNode(origin->first); | 818 root->GetOrCreateOriginNode(origin->first); |
| 785 CookieTreeAppCachesNode* appcaches_node = | 819 CookieTreeAppCachesNode* appcaches_node = |
| 786 origin_node->GetOrCreateAppCachesNode(); | 820 origin_node->GetOrCreateAppCachesNode(); |
| 787 | 821 |
| 788 for (AppCacheInfoVector::const_iterator info = origin->second.begin(); | 822 for (std::list<AppCacheInfo>::iterator info = origin->second.begin(); |
| 789 info != origin->second.end(); ++info) { | 823 info != origin->second.end(); ++info) { |
| 790 appcaches_node->AddAppCacheNode( | 824 appcaches_node->AddAppCacheNode( |
| 791 new CookieTreeAppCacheNode(&(*info))); | 825 new CookieTreeAppCacheNode(origin->first, info)); |
| 792 } | 826 } |
| 793 } | 827 } |
| 794 } | 828 } |
| 795 NotifyObserverTreeNodeChanged(root); | 829 NotifyObserverTreeNodeChanged(root); |
| 796 NotifyObserverEndBatch(); | 830 NotifyObserverEndBatch(); |
| 797 } | 831 } |
| 798 | 832 |
| 799 void CookiesTreeModel::OnCookiesModelInfoLoaded( | 833 void CookiesTreeModel::OnCookiesModelInfoLoaded( |
| 800 const CookieList& cookie_list) { | 834 const net::CookieList& cookie_list) { |
| 801 cookie_list_ = cookie_list; | 835 cookie_list_.insert(cookie_list_.begin(), |
| 836 cookie_list.begin(), | |
| 837 cookie_list.end()); | |
| 802 PopulateCookieInfoWithFilter(std::wstring()); | 838 PopulateCookieInfoWithFilter(std::wstring()); |
| 803 } | 839 } |
| 804 | 840 |
| 805 void CookiesTreeModel::PopulateCookieInfoWithFilter( | 841 void CookiesTreeModel::PopulateCookieInfoWithFilter( |
| 806 const std::wstring& filter) { | 842 const std::wstring& filter) { |
| 807 // mmargh mmargh mmargh! delicious! | 843 // mmargh mmargh mmargh! delicious! |
| 808 | 844 |
| 809 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); | 845 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); |
| 810 for (CookieList::iterator it = cookie_list_.begin(); | 846 for (CookieList::iterator it = cookie_list_.begin(); |
| 811 it != cookie_list_.end(); ++it) { | 847 it != cookie_list_.end(); ++it) { |
| 812 std::string source_string = it->Source(); | 848 std::string source_string = it->Source(); |
| 813 if (source_string.empty() || !use_cookie_source_) { | 849 if (source_string.empty() || !use_cookie_source_) { |
| 814 std::string domain = it->Domain(); | 850 std::string domain = it->Domain(); |
| 815 if (domain.length() > 1 && domain[0] == '.') | 851 if (domain.length() > 1 && domain[0] == '.') |
| 816 domain = domain.substr(1); | 852 domain = domain.substr(1); |
| 817 | 853 |
| 818 // We treat secure cookies just the same as normal ones. | 854 // We treat secure cookies just the same as normal ones. |
| 819 source_string = std::string(chrome::kHttpScheme) + | 855 source_string = std::string(chrome::kHttpScheme) + |
| 820 chrome::kStandardSchemeSeparator + domain + "/"; | 856 chrome::kStandardSchemeSeparator + domain + "/"; |
| 821 } | 857 } |
| 822 | 858 |
| 823 GURL source(source_string); | 859 GURL source(source_string); |
| 824 if (!filter.size() || | 860 if (!filter.size() || |
| 825 (CookieTreeOriginNode::TitleForUrl(source).find(filter) != | 861 (CookieTreeOriginNode::TitleForUrl(source).find(filter) != |
| 826 std::string::npos)) { | 862 std::string::npos)) { |
| 827 CookieTreeOriginNode* origin_node = | 863 CookieTreeOriginNode* origin_node = |
| 828 root->GetOrCreateOriginNode(source); | 864 root->GetOrCreateOriginNode(source); |
| 829 CookieTreeCookiesNode* cookies_node = | 865 CookieTreeCookiesNode* cookies_node = |
| 830 origin_node->GetOrCreateCookiesNode(); | 866 origin_node->GetOrCreateCookiesNode(); |
| 831 CookieTreeCookieNode* new_cookie = new CookieTreeCookieNode(&*it); | 867 CookieTreeCookieNode* new_cookie = new CookieTreeCookieNode(it); |
| 832 cookies_node->AddCookieNode(new_cookie); | 868 cookies_node->AddCookieNode(new_cookie); |
| 833 } | 869 } |
| 834 } | 870 } |
| 835 } | 871 } |
| 836 | 872 |
| 837 void CookiesTreeModel::OnDatabaseModelInfoLoaded( | 873 void CookiesTreeModel::OnDatabaseModelInfoLoaded( |
| 838 const DatabaseInfoList& database_info) { | 874 const DatabaseInfoList& database_info) { |
| 839 database_info_list_ = database_info; | 875 database_info_list_ = database_info; |
| 840 PopulateDatabaseInfoWithFilter(std::wstring()); | 876 PopulateDatabaseInfoWithFilter(std::wstring()); |
| 841 } | 877 } |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 852 GURL origin(database_info->origin); | 888 GURL origin(database_info->origin); |
| 853 | 889 |
| 854 if (!filter.size() || | 890 if (!filter.size() || |
| 855 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != | 891 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != |
| 856 std::wstring::npos)) { | 892 std::wstring::npos)) { |
| 857 CookieTreeOriginNode* origin_node = | 893 CookieTreeOriginNode* origin_node = |
| 858 root->GetOrCreateOriginNode(origin); | 894 root->GetOrCreateOriginNode(origin); |
| 859 CookieTreeDatabasesNode* databases_node = | 895 CookieTreeDatabasesNode* databases_node = |
| 860 origin_node->GetOrCreateDatabasesNode(); | 896 origin_node->GetOrCreateDatabasesNode(); |
| 861 databases_node->AddDatabaseNode( | 897 databases_node->AddDatabaseNode( |
| 862 new CookieTreeDatabaseNode(&(*database_info))); | 898 new CookieTreeDatabaseNode(database_info)); |
| 863 } | 899 } |
| 864 } | 900 } |
| 865 NotifyObserverTreeNodeChanged(root); | 901 NotifyObserverTreeNodeChanged(root); |
| 866 NotifyObserverEndBatch(); | 902 NotifyObserverEndBatch(); |
| 867 } | 903 } |
| 868 | 904 |
| 869 void CookiesTreeModel::OnLocalStorageModelInfoLoaded( | 905 void CookiesTreeModel::OnLocalStorageModelInfoLoaded( |
| 870 const LocalStorageInfoList& local_storage_info) { | 906 const LocalStorageInfoList& local_storage_info) { |
| 871 local_storage_info_list_ = local_storage_info; | 907 local_storage_info_list_ = local_storage_info; |
| 872 PopulateLocalStorageInfoWithFilter(std::wstring()); | 908 PopulateLocalStorageInfoWithFilter(std::wstring()); |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 885 GURL origin(local_storage_info->origin); | 921 GURL origin(local_storage_info->origin); |
| 886 | 922 |
| 887 if (!filter.size() || | 923 if (!filter.size() || |
| 888 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != | 924 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != |
| 889 std::wstring::npos)) { | 925 std::wstring::npos)) { |
| 890 CookieTreeOriginNode* origin_node = | 926 CookieTreeOriginNode* origin_node = |
| 891 root->GetOrCreateOriginNode(origin); | 927 root->GetOrCreateOriginNode(origin); |
| 892 CookieTreeLocalStoragesNode* local_storages_node = | 928 CookieTreeLocalStoragesNode* local_storages_node = |
| 893 origin_node->GetOrCreateLocalStoragesNode(); | 929 origin_node->GetOrCreateLocalStoragesNode(); |
| 894 local_storages_node->AddLocalStorageNode( | 930 local_storages_node->AddLocalStorageNode( |
| 895 new CookieTreeLocalStorageNode(&(*local_storage_info))); | 931 new CookieTreeLocalStorageNode(local_storage_info)); |
| 896 } | 932 } |
| 897 } | 933 } |
| 898 NotifyObserverTreeNodeChanged(root); | 934 NotifyObserverTreeNodeChanged(root); |
| 899 NotifyObserverEndBatch(); | 935 NotifyObserverEndBatch(); |
| 900 } | 936 } |
| 901 | 937 |
| 902 void CookiesTreeModel::OnSessionStorageModelInfoLoaded( | 938 void CookiesTreeModel::OnSessionStorageModelInfoLoaded( |
| 903 const LocalStorageInfoList& session_storage_info) { | 939 const LocalStorageInfoList& session_storage_info) { |
| 904 session_storage_info_list_ = session_storage_info; | 940 session_storage_info_list_ = session_storage_info; |
| 905 PopulateSessionStorageInfoWithFilter(std::wstring()); | 941 PopulateSessionStorageInfoWithFilter(std::wstring()); |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 918 GURL origin(session_storage_info->origin); | 954 GURL origin(session_storage_info->origin); |
| 919 | 955 |
| 920 if (!filter.size() || | 956 if (!filter.size() || |
| 921 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != | 957 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != |
| 922 std::wstring::npos)) { | 958 std::wstring::npos)) { |
| 923 CookieTreeOriginNode* origin_node = | 959 CookieTreeOriginNode* origin_node = |
| 924 root->GetOrCreateOriginNode(origin); | 960 root->GetOrCreateOriginNode(origin); |
| 925 CookieTreeSessionStoragesNode* session_storages_node = | 961 CookieTreeSessionStoragesNode* session_storages_node = |
| 926 origin_node->GetOrCreateSessionStoragesNode(); | 962 origin_node->GetOrCreateSessionStoragesNode(); |
| 927 session_storages_node->AddSessionStorageNode( | 963 session_storages_node->AddSessionStorageNode( |
| 928 new CookieTreeSessionStorageNode(&(*session_storage_info))); | 964 new CookieTreeSessionStorageNode(session_storage_info)); |
| 929 } | 965 } |
| 930 } | 966 } |
| 931 NotifyObserverTreeNodeChanged(root); | 967 NotifyObserverTreeNodeChanged(root); |
| 932 NotifyObserverEndBatch(); | 968 NotifyObserverEndBatch(); |
| 933 } | 969 } |
| 934 | 970 |
| 935 void CookiesTreeModel::OnIndexedDBModelInfoLoaded( | 971 void CookiesTreeModel::OnIndexedDBModelInfoLoaded( |
| 936 const IndexedDBInfoList& indexed_db_info) { | 972 const IndexedDBInfoList& indexed_db_info) { |
| 937 indexed_db_info_list_ = indexed_db_info; | 973 indexed_db_info_list_ = indexed_db_info; |
| 938 PopulateIndexedDBInfoWithFilter(std::wstring()); | 974 PopulateIndexedDBInfoWithFilter(std::wstring()); |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 951 GURL origin(indexed_db_info->origin); | 987 GURL origin(indexed_db_info->origin); |
| 952 | 988 |
| 953 if (!filter.size() || | 989 if (!filter.size() || |
| 954 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != | 990 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != |
| 955 std::wstring::npos)) { | 991 std::wstring::npos)) { |
| 956 CookieTreeOriginNode* origin_node = | 992 CookieTreeOriginNode* origin_node = |
| 957 root->GetOrCreateOriginNode(origin); | 993 root->GetOrCreateOriginNode(origin); |
| 958 CookieTreeIndexedDBsNode* indexed_dbs_node = | 994 CookieTreeIndexedDBsNode* indexed_dbs_node = |
| 959 origin_node->GetOrCreateIndexedDBsNode(); | 995 origin_node->GetOrCreateIndexedDBsNode(); |
| 960 indexed_dbs_node->AddIndexedDBNode( | 996 indexed_dbs_node->AddIndexedDBNode( |
| 961 new CookieTreeIndexedDBNode(&(*indexed_db_info))); | 997 new CookieTreeIndexedDBNode(indexed_db_info)); |
| 962 } | 998 } |
| 963 } | 999 } |
| 964 NotifyObserverTreeNodeChanged(root); | 1000 NotifyObserverTreeNodeChanged(root); |
| 965 NotifyObserverEndBatch(); | 1001 NotifyObserverEndBatch(); |
| 966 } | 1002 } |
| 967 | 1003 |
| 968 void CookiesTreeModel::OnFileSystemModelInfoLoaded( | 1004 void CookiesTreeModel::OnFileSystemModelInfoLoaded( |
| 969 const FileSystemInfoList& file_system_info) { | 1005 const FileSystemInfoList& file_system_info) { |
| 970 file_system_info_list_ = file_system_info; | 1006 file_system_info_list_ = file_system_info; |
| 971 PopulateFileSystemInfoWithFilter(std::wstring()); | 1007 PopulateFileSystemInfoWithFilter(std::wstring()); |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 984 GURL origin(file_system_info->origin); | 1020 GURL origin(file_system_info->origin); |
| 985 | 1021 |
| 986 if (!filter.size() || | 1022 if (!filter.size() || |
| 987 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != | 1023 (CookieTreeOriginNode::TitleForUrl(origin).find(filter) != |
| 988 std::wstring::npos)) { | 1024 std::wstring::npos)) { |
| 989 CookieTreeOriginNode* origin_node = | 1025 CookieTreeOriginNode* origin_node = |
| 990 root->GetOrCreateOriginNode(origin); | 1026 root->GetOrCreateOriginNode(origin); |
| 991 CookieTreeFileSystemsNode* file_systems_node = | 1027 CookieTreeFileSystemsNode* file_systems_node = |
| 992 origin_node->GetOrCreateFileSystemsNode(); | 1028 origin_node->GetOrCreateFileSystemsNode(); |
| 993 file_systems_node->AddFileSystemNode( | 1029 file_systems_node->AddFileSystemNode( |
| 994 new CookieTreeFileSystemNode(&(*file_system_info))); | 1030 new CookieTreeFileSystemNode(file_system_info)); |
| 995 } | 1031 } |
| 996 } | 1032 } |
| 997 NotifyObserverTreeNodeChanged(root); | 1033 NotifyObserverTreeNodeChanged(root); |
| 998 NotifyObserverEndBatch(); | 1034 NotifyObserverEndBatch(); |
| 999 } | 1035 } |
| 1000 | 1036 |
| 1001 void CookiesTreeModel::OnQuotaModelInfoLoaded( | 1037 void CookiesTreeModel::OnQuotaModelInfoLoaded( |
| 1002 const QuotaInfoArray& quota_info) { | 1038 const QuotaInfoArray& quota_info) { |
| 1003 quota_info_list_ = quota_info; | 1039 quota_info_list_ = quota_info; |
| 1004 PopulateQuotaInfoWithFilter(std::wstring()); | 1040 PopulateQuotaInfoWithFilter(std::wstring()); |
| 1005 } | 1041 } |
| 1006 | 1042 |
| 1007 void CookiesTreeModel::PopulateQuotaInfoWithFilter( | 1043 void CookiesTreeModel::PopulateQuotaInfoWithFilter( |
| 1008 const std::wstring& filter) { | 1044 const std::wstring& filter) { |
| 1009 if (quota_info_list_.empty()) | 1045 if (quota_info_list_.empty()) |
| 1010 return; | 1046 return; |
| 1011 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); | 1047 CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); |
| 1012 NotifyObserverBeginBatch(); | 1048 NotifyObserverBeginBatch(); |
| 1013 for (QuotaInfoArray::iterator quota_info = quota_info_list_.begin(); | 1049 for (QuotaInfoArray::iterator quota_info = quota_info_list_.begin(); |
| 1014 quota_info != quota_info_list_.end(); | 1050 quota_info != quota_info_list_.end(); |
| 1015 ++quota_info) { | 1051 ++quota_info) { |
| 1016 if (!filter.size() || | 1052 if (!filter.size() || |
| 1017 (UTF8ToWide(quota_info->host).find(filter) != std::wstring::npos)) { | 1053 (UTF8ToWide(quota_info->host).find(filter) != std::wstring::npos)) { |
| 1018 CookieTreeOriginNode* origin_node = | 1054 CookieTreeOriginNode* origin_node = |
| 1019 root->GetOrCreateOriginNode(GURL("http://" + quota_info->host)); | 1055 root->GetOrCreateOriginNode(GURL("http://" + quota_info->host)); |
| 1020 origin_node->UpdateOrCreateQuotaNode(&*quota_info); | 1056 origin_node->UpdateOrCreateQuotaNode(quota_info); |
| 1021 } | 1057 } |
| 1022 } | 1058 } |
| 1023 NotifyObserverTreeNodeChanged(root); | 1059 NotifyObserverTreeNodeChanged(root); |
| 1024 NotifyObserverEndBatch(); | 1060 NotifyObserverEndBatch(); |
| 1025 } | 1061 } |
| 1026 | 1062 |
| 1027 void CookiesTreeModel::NotifyObserverBeginBatch() { | 1063 void CookiesTreeModel::NotifyObserverBeginBatch() { |
| 1028 // Only notify the model once if we're batching in a nested manner. | 1064 // Only notify the model once if we're batching in a nested manner. |
| 1029 if (batch_update_++ == 0) { | 1065 if (batch_update_++ == 0) { |
| 1030 FOR_EACH_OBSERVER(Observer, | 1066 FOR_EACH_OBSERVER(Observer, |
| 1031 cookies_observer_list_, | 1067 cookies_observer_list_, |
| 1032 TreeModelBeginBatch(this)); | 1068 TreeModelBeginBatch(this)); |
| 1033 } | 1069 } |
| 1034 } | 1070 } |
| 1035 | 1071 |
| 1036 void CookiesTreeModel::NotifyObserverEndBatch() { | 1072 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 1037 // Only notify the observers if this is the outermost call to EndBatch() if | 1073 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1038 // called in a nested manner. | 1074 // called in a nested manner. |
| 1039 if (--batch_update_ == 0) { | 1075 if (--batch_update_ == 0) { |
| 1040 FOR_EACH_OBSERVER(Observer, | 1076 FOR_EACH_OBSERVER(Observer, |
| 1041 cookies_observer_list_, | 1077 cookies_observer_list_, |
| 1042 TreeModelEndBatch(this)); | 1078 TreeModelEndBatch(this)); |
| 1043 } | 1079 } |
| 1044 } | 1080 } |
| OLD | NEW |