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 #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 |
11 #include <list> | 11 #include <list> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 20 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
21 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 21 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
22 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 22 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
23 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 23 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
24 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 24 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
25 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" | 25 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" |
26 #include "chrome/browser/browsing_data/local_data_container.h" | 26 #include "chrome/browser/browsing_data/local_data_container.h" |
27 #include "chrome/common/content_settings.h" | 27 #include "chrome/common/content_settings.h" |
28 #include "chrome/common/extensions/extension_set.h" | |
29 #include "net/ssl/server_bound_cert_store.h" | 28 #include "net/ssl/server_bound_cert_store.h" |
30 #include "ui/base/models/tree_node_model.h" | 29 #include "ui/base/models/tree_node_model.h" |
31 | 30 |
32 class BrowsingDataCookieHelper; | 31 class BrowsingDataCookieHelper; |
33 class BrowsingDataServerBoundCertHelper; | 32 class BrowsingDataServerBoundCertHelper; |
34 class CookieSettings; | 33 class CookieSettings; |
35 class CookiesTreeModel; | 34 class CookiesTreeModel; |
36 class CookieTreeAppCacheNode; | 35 class CookieTreeAppCacheNode; |
37 class CookieTreeAppCachesNode; | 36 class CookieTreeAppCachesNode; |
38 class CookieTreeCookieNode; | 37 class CookieTreeCookieNode; |
39 class CookieTreeCookiesNode; | 38 class CookieTreeCookiesNode; |
40 class CookieTreeDatabaseNode; | 39 class CookieTreeDatabaseNode; |
41 class CookieTreeDatabasesNode; | 40 class CookieTreeDatabasesNode; |
42 class CookieTreeFileSystemNode; | 41 class CookieTreeFileSystemNode; |
43 class CookieTreeFileSystemsNode; | 42 class CookieTreeFileSystemsNode; |
44 class CookieTreeFlashLSONode; | 43 class CookieTreeFlashLSONode; |
45 class CookieTreeHostNode; | 44 class CookieTreeHostNode; |
46 class CookieTreeIndexedDBNode; | 45 class CookieTreeIndexedDBNode; |
47 class CookieTreeIndexedDBsNode; | 46 class CookieTreeIndexedDBsNode; |
48 class CookieTreeLocalStorageNode; | 47 class CookieTreeLocalStorageNode; |
49 class CookieTreeLocalStoragesNode; | 48 class CookieTreeLocalStoragesNode; |
50 class CookieTreeQuotaNode; | 49 class CookieTreeQuotaNode; |
51 class CookieTreeServerBoundCertNode; | 50 class CookieTreeServerBoundCertNode; |
52 class CookieTreeServerBoundCertsNode; | 51 class CookieTreeServerBoundCertsNode; |
53 class CookieTreeSessionStorageNode; | 52 class CookieTreeSessionStorageNode; |
54 class CookieTreeSessionStoragesNode; | 53 class CookieTreeSessionStoragesNode; |
55 class ExtensionSpecialStoragePolicy; | 54 class ExtensionSpecialStoragePolicy; |
56 | 55 |
| 56 namespace extensions { |
| 57 class ExtensionSet; |
| 58 } |
| 59 |
57 namespace net { | 60 namespace net { |
58 class CanonicalCookie; | 61 class CanonicalCookie; |
59 } | 62 } |
60 | 63 |
61 // CookieTreeNode ------------------------------------------------------------- | 64 // CookieTreeNode ------------------------------------------------------------- |
62 // The base node type in the Cookies, Databases, and Local Storage options | 65 // The base node type in the Cookies, Databases, and Local Storage options |
63 // view, from which all other types are derived. Specialized from TreeNode in | 66 // view, from which all other types are derived. Specialized from TreeNode in |
64 // that it has a notion of deleting objects stored in the profile, and being | 67 // that it has a notion of deleting objects stored in the profile, and being |
65 // able to have its children do the same. | 68 // able to have its children do the same. |
66 class CookieTreeNode : public ui::TreeNode<CookieTreeNode> { | 69 class CookieTreeNode : public ui::TreeNode<CookieTreeNode> { |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 // subtree. | 637 // subtree. |
635 void DeleteCookieNode(CookieTreeNode* cookie_node); | 638 void DeleteCookieNode(CookieTreeNode* cookie_node); |
636 | 639 |
637 // Filter the origins to only display matched results. | 640 // Filter the origins to only display matched results. |
638 void UpdateSearchResults(const base::string16& filter); | 641 void UpdateSearchResults(const base::string16& filter); |
639 | 642 |
640 // Returns the set of extensions which protect the data item represented by | 643 // Returns the set of extensions which protect the data item represented by |
641 // this node from deletion. | 644 // this node from deletion. |
642 // Returns NULL if the node doesn't represent a protected data item or the | 645 // Returns NULL if the node doesn't represent a protected data item or the |
643 // special storage policy is NULL. | 646 // special storage policy is NULL. |
644 const ExtensionSet* ExtensionsProtectingNode( | 647 const extensions::ExtensionSet* ExtensionsProtectingNode( |
645 const CookieTreeNode& cookie_node); | 648 const CookieTreeNode& cookie_node); |
646 | 649 |
647 // Manages CookiesTreeModel::Observers. This will also call | 650 // Manages CookiesTreeModel::Observers. This will also call |
648 // TreeNodeModel::AddObserver so that it gets all the proper notifications. | 651 // TreeNodeModel::AddObserver so that it gets all the proper notifications. |
649 // 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 |
650 // not get CookiesTreeModel::Observer notifications. | 653 // not get CookiesTreeModel::Observer notifications. |
651 virtual void AddCookiesTreeObserver(Observer* observer); | 654 virtual void AddCookiesTreeObserver(Observer* observer); |
652 virtual void RemoveCookiesTreeObserver(Observer* observer); | 655 virtual void RemoveCookiesTreeObserver(Observer* observer); |
653 | 656 |
654 // 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 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // Otherwise, use the CanonicalCookie::Domain attribute. | 729 // Otherwise, use the CanonicalCookie::Domain attribute. |
727 bool group_by_cookie_source_; | 730 bool group_by_cookie_source_; |
728 | 731 |
729 // If this is non-zero, then this model is batching updates (there's a lot of | 732 // If this is non-zero, then this model is batching updates (there's a lot of |
730 // notifications coming down the pipe). This is an integer is used to balance | 733 // notifications coming down the pipe). This is an integer is used to balance |
731 // calls to Begin/EndBatch() if they're called in a nested manner. | 734 // calls to Begin/EndBatch() if they're called in a nested manner. |
732 int batch_update_; | 735 int batch_update_; |
733 }; | 736 }; |
734 | 737 |
735 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_ | 738 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIES_TREE_MODEL_H_ |
OLD | NEW |