Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: chrome/browser/browsing_data/cookies_tree_model.h

Issue 428323002: ifdef remaining extensions code in chrome/browser/browsing_data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_
6 #define CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_
7 7
8 // TODO(viettrungluu): This header file #includes far too much and has too much 8 // TODO(viettrungluu): This header file #includes far too much and has too much
9 // inline code (which shouldn't be inline). 9 // inline code (which shouldn't be inline).
10 10
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 CookieTreeLocalStoragesNode(); 421 CookieTreeLocalStoragesNode();
422 virtual ~CookieTreeLocalStoragesNode(); 422 virtual ~CookieTreeLocalStoragesNode();
423 423
424 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; 424 virtual DetailedInfo GetDetailedInfo() const OVERRIDE;
425 425
426 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) { 426 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) {
427 AddChildSortedByTitle(child); 427 AddChildSortedByTitle(child);
428 } 428 }
429 429
430 private: 430 private:
431
432 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode); 431 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode);
433 }; 432 };
434 433
435 434
436 // CookieTreeSessionStorageNode ----------------------------------------------- 435 // CookieTreeSessionStorageNode -----------------------------------------------
437 class CookieTreeSessionStorageNode : public CookieTreeNode { 436 class CookieTreeSessionStorageNode : public CookieTreeNode {
438 public: 437 public:
439 // session_storage_info should remain valid at least as long as the 438 // session_storage_info should remain valid at least as long as the
440 // CookieTreeSessionStorageNode is valid. 439 // CookieTreeSessionStorageNode is valid.
441 explicit CookieTreeSessionStorageNode( 440 explicit CookieTreeSessionStorageNode(
(...skipping 19 matching lines...) Expand all
461 CookieTreeSessionStoragesNode(); 460 CookieTreeSessionStoragesNode();
462 virtual ~CookieTreeSessionStoragesNode(); 461 virtual ~CookieTreeSessionStoragesNode();
463 462
464 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; 463 virtual DetailedInfo GetDetailedInfo() const OVERRIDE;
465 464
466 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) { 465 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) {
467 AddChildSortedByTitle(child); 466 AddChildSortedByTitle(child);
468 } 467 }
469 468
470 private: 469 private:
471
472 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode); 470 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode);
473 }; 471 };
474 472
475 // CookieTreeIndexedDBNode ----------------------------------------------- 473 // CookieTreeIndexedDBNode -----------------------------------------------
476 class CookieTreeIndexedDBNode : public CookieTreeNode { 474 class CookieTreeIndexedDBNode : public CookieTreeNode {
477 public: 475 public:
478 // indexed_db_info should remain valid at least as long as the 476 // indexed_db_info should remain valid at least as long as the
479 // CookieTreeIndexedDBNode is valid. 477 // CookieTreeIndexedDBNode is valid.
480 explicit CookieTreeIndexedDBNode( 478 explicit CookieTreeIndexedDBNode(
481 std::list<content::IndexedDBInfo>::iterator 479 std::list<content::IndexedDBInfo>::iterator
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // CookiesTreeModel methods: 631 // CookiesTreeModel methods:
634 void DeleteAllStoredObjects(); 632 void DeleteAllStoredObjects();
635 633
636 // Deletes a specific node in the tree, identified by |cookie_node|, and its 634 // Deletes a specific node in the tree, identified by |cookie_node|, and its
637 // subtree. 635 // subtree.
638 void DeleteCookieNode(CookieTreeNode* cookie_node); 636 void DeleteCookieNode(CookieTreeNode* cookie_node);
639 637
640 // Filter the origins to only display matched results. 638 // Filter the origins to only display matched results.
641 void UpdateSearchResults(const base::string16& filter); 639 void UpdateSearchResults(const base::string16& filter);
642 640
641 #if defined(ENABLE_EXTENSIONS)
643 // Returns the set of extensions which protect the data item represented by 642 // Returns the set of extensions which protect the data item represented by
644 // this node from deletion. 643 // this node from deletion.
645 // Returns NULL if the node doesn't represent a protected data item or the 644 // Returns NULL if the node doesn't represent a protected data item or the
646 // special storage policy is NULL. 645 // special storage policy is NULL.
647 const extensions::ExtensionSet* ExtensionsProtectingNode( 646 const extensions::ExtensionSet* ExtensionsProtectingNode(
648 const CookieTreeNode& cookie_node); 647 const CookieTreeNode& cookie_node);
648 #endif
649 649
650 // Manages CookiesTreeModel::Observers. This will also call 650 // Manages CookiesTreeModel::Observers. This will also call
651 // TreeNodeModel::AddObserver so that it gets all the proper notifications. 651 // TreeNodeModel::AddObserver so that it gets all the proper notifications.
652 // Note that the converse is not true: simply adding a TreeModelObserver will 652 // Note that the converse is not true: simply adding a TreeModelObserver will
653 // not get CookiesTreeModel::Observer notifications. 653 // not get CookiesTreeModel::Observer notifications.
654 virtual void AddCookiesTreeObserver(Observer* observer); 654 virtual void AddCookiesTreeObserver(Observer* observer);
655 virtual void RemoveCookiesTreeObserver(Observer* observer); 655 virtual void RemoveCookiesTreeObserver(Observer* observer);
656 656
657 // Methods that update the model based on the data retrieved by the browsing 657 // Methods that update the model based on the data retrieved by the browsing
658 // data helpers. 658 // data helpers.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 ScopedBatchUpdateNotifier* notifier, 711 ScopedBatchUpdateNotifier* notifier,
712 const base::string16& filter); 712 const base::string16& filter);
713 void PopulateFlashLSOInfoWithFilter(LocalDataContainer* container, 713 void PopulateFlashLSOInfoWithFilter(LocalDataContainer* container,
714 ScopedBatchUpdateNotifier* notifier, 714 ScopedBatchUpdateNotifier* notifier,
715 const base::string16& filter); 715 const base::string16& filter);
716 716
717 // Map of app ids to LocalDataContainer objects to use when retrieving 717 // Map of app ids to LocalDataContainer objects to use when retrieving
718 // locally stored data. 718 // locally stored data.
719 scoped_ptr<LocalDataContainer> data_container_; 719 scoped_ptr<LocalDataContainer> data_container_;
720 720
721 #if defined(ENABLE_EXTENSIONS)
721 // The extension special storage policy; see ExtensionsProtectingNode() above. 722 // The extension special storage policy; see ExtensionsProtectingNode() above.
722 scoped_refptr<ExtensionSpecialStoragePolicy> special_storage_policy_; 723 scoped_refptr<ExtensionSpecialStoragePolicy> special_storage_policy_;
724 #endif
723 725
724 // The CookiesTreeModel maintains a separate list of observers that are 726 // The CookiesTreeModel maintains a separate list of observers that are
725 // specifically of the type CookiesTreeModel::Observer. 727 // specifically of the type CookiesTreeModel::Observer.
726 ObserverList<Observer> cookies_observer_list_; 728 ObserverList<Observer> cookies_observer_list_;
727 729
728 // If true, use the CanonicalCookie::Source attribute to group cookies. 730 // If true, use the CanonicalCookie::Source attribute to group cookies.
729 // Otherwise, use the CanonicalCookie::Domain attribute. 731 // Otherwise, use the CanonicalCookie::Domain attribute.
730 bool group_by_cookie_source_; 732 bool group_by_cookie_source_;
731 733
732 // If this is non-zero, then this model is batching updates (there's a lot of 734 // If this is non-zero, then this model is batching updates (there's a lot of
733 // notifications coming down the pipe). This is an integer is used to balance 735 // notifications coming down the pipe). This is an integer is used to balance
734 // calls to Begin/EndBatch() if they're called in a nested manner. 736 // calls to Begin/EndBatch() if they're called in a nested manner.
735 int batch_update_; 737 int batch_update_;
736 }; 738 };
737 739
738 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_ 740 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698