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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 base::UTF8ToUTF16(session_storage_info->origin_url.spec())), | 390 base::UTF8ToUTF16(session_storage_info->origin_url.spec())), |
391 session_storage_info_(session_storage_info) { | 391 session_storage_info_(session_storage_info) { |
392 } | 392 } |
393 | 393 |
394 CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {} | 394 CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {} |
395 | 395 |
396 void CookieTreeSessionStorageNode::DeleteStoredObjects() { | 396 void CookieTreeSessionStorageNode::DeleteStoredObjects() { |
397 LocalDataContainer* container = GetLocalDataContainerForNode(this); | 397 LocalDataContainer* container = GetLocalDataContainerForNode(this); |
398 | 398 |
399 if (container) { | 399 if (container) { |
| 400 // TODO(rsesek): There's no easy way to get the namespace_id for a session |
| 401 // storage, nor is there an easy way to clear session storage just by |
| 402 // origin. This is probably okay since session storage is not persistent. |
| 403 // http://crbug.com/168996 |
400 container->session_storage_info_list_.erase(session_storage_info_); | 404 container->session_storage_info_list_.erase(session_storage_info_); |
401 } | 405 } |
402 } | 406 } |
403 | 407 |
404 CookieTreeNode::DetailedInfo | 408 CookieTreeNode::DetailedInfo |
405 CookieTreeSessionStorageNode::GetDetailedInfo() const { | 409 CookieTreeSessionStorageNode::GetDetailedInfo() const { |
406 return DetailedInfo().InitSessionStorage(&*session_storage_info_); | 410 return DetailedInfo().InitSessionStorage(&*session_storage_info_); |
407 } | 411 } |
408 | 412 |
409 /////////////////////////////////////////////////////////////////////////////// | 413 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 | 1335 |
1332 void CookiesTreeModel::NotifyObserverEndBatch() { | 1336 void CookiesTreeModel::NotifyObserverEndBatch() { |
1333 // Only notify the observers if this is the outermost call to EndBatch() if | 1337 // Only notify the observers if this is the outermost call to EndBatch() if |
1334 // called in a nested manner. | 1338 // called in a nested manner. |
1335 if (--batch_update_ == 0) { | 1339 if (--batch_update_ == 0) { |
1336 FOR_EACH_OBSERVER(Observer, | 1340 FOR_EACH_OBSERVER(Observer, |
1337 cookies_observer_list_, | 1341 cookies_observer_list_, |
1338 TreeModelEndBatch(this)); | 1342 TreeModelEndBatch(this)); |
1339 } | 1343 } |
1340 } | 1344 } |
OLD | NEW |