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

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

Issue 6966036: Wrapping blocked filesystems into TabSpecificContentSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased onto trunk. Created 9 years, 7 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) 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 #ifndef CHROME_BROWSER_COOKIES_TREE_MODEL_H_ 5 #ifndef CHROME_BROWSER_COOKIES_TREE_MODEL_H_
6 #define CHROME_BROWSER_COOKIES_TREE_MODEL_H_ 6 #define CHROME_BROWSER_COOKIES_TREE_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 // TODO(viettrungluu): This header file #includes far too much and has too much 9 // TODO(viettrungluu): This header file #includes far too much and has too much
10 // inline code (which shouldn't be inline). 10 // inline code (which shouldn't be inline).
11 11
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/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/string16.h" 17 #include "base/string16.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "chrome/browser/browsing_data_appcache_helper.h" 19 #include "chrome/browser/browsing_data_appcache_helper.h"
20 #include "chrome/browser/browsing_data_database_helper.h" 20 #include "chrome/browser/browsing_data_database_helper.h"
21 #include "chrome/browser/browsing_data_file_system_helper.h"
21 #include "chrome/browser/browsing_data_indexed_db_helper.h" 22 #include "chrome/browser/browsing_data_indexed_db_helper.h"
22 #include "chrome/browser/browsing_data_local_storage_helper.h" 23 #include "chrome/browser/browsing_data_local_storage_helper.h"
23 #include "chrome/common/content_settings.h" 24 #include "chrome/common/content_settings.h"
24 #include "net/base/cookie_monster.h" 25 #include "net/base/cookie_monster.h"
25 #include "ui/base/models/tree_node_model.h" 26 #include "ui/base/models/tree_node_model.h"
26 27
27 class CookiesTreeModel; 28 class CookiesTreeModel;
28 class CookieTreeAppCacheNode; 29 class CookieTreeAppCacheNode;
29 class CookieTreeAppCachesNode; 30 class CookieTreeAppCachesNode;
30 class CookieTreeCookieNode; 31 class CookieTreeCookieNode;
31 class CookieTreeCookiesNode; 32 class CookieTreeCookiesNode;
32 class CookieTreeDatabaseNode; 33 class CookieTreeDatabaseNode;
33 class CookieTreeDatabasesNode; 34 class CookieTreeDatabasesNode;
35 class CookieTreeFileSystemsNode;
36 class CookieTreeFileSystemNode;
34 class CookieTreeLocalStorageNode; 37 class CookieTreeLocalStorageNode;
35 class CookieTreeLocalStoragesNode; 38 class CookieTreeLocalStoragesNode;
36 class CookieTreeSessionStorageNode; 39 class CookieTreeSessionStorageNode;
37 class CookieTreeSessionStoragesNode; 40 class CookieTreeSessionStoragesNode;
38 class CookieTreeIndexedDBNode; 41 class CookieTreeIndexedDBNode;
39 class CookieTreeIndexedDBsNode; 42 class CookieTreeIndexedDBsNode;
40 class CookieTreeOriginNode; 43 class CookieTreeOriginNode;
41 class HostContentSettingsMap; 44 class HostContentSettingsMap;
42 45
43 // CookieTreeNode ------------------------------------------------------------- 46 // CookieTreeNode -------------------------------------------------------------
(...skipping 15 matching lines...) Expand all
59 TYPE_DATABASES, // This is used for CookieTreeDatabasesNode. 62 TYPE_DATABASES, // This is used for CookieTreeDatabasesNode.
60 TYPE_DATABASE, // This is used for CookieTreeDatabaseNode. 63 TYPE_DATABASE, // This is used for CookieTreeDatabaseNode.
61 TYPE_LOCAL_STORAGES, // This is used for CookieTreeLocalStoragesNode. 64 TYPE_LOCAL_STORAGES, // This is used for CookieTreeLocalStoragesNode.
62 TYPE_LOCAL_STORAGE, // This is used for CookieTreeLocalStorageNode. 65 TYPE_LOCAL_STORAGE, // This is used for CookieTreeLocalStorageNode.
63 TYPE_SESSION_STORAGES, // This is used for CookieTreeSessionStoragesNode. 66 TYPE_SESSION_STORAGES, // This is used for CookieTreeSessionStoragesNode.
64 TYPE_SESSION_STORAGE, // This is used for CookieTreeSessionStorageNode. 67 TYPE_SESSION_STORAGE, // This is used for CookieTreeSessionStorageNode.
65 TYPE_APPCACHES, // This is used for CookieTreeAppCachesNode. 68 TYPE_APPCACHES, // This is used for CookieTreeAppCachesNode.
66 TYPE_APPCACHE, // This is used for CookieTreeAppCacheNode. 69 TYPE_APPCACHE, // This is used for CookieTreeAppCacheNode.
67 TYPE_INDEXED_DBS, // This is used for CookieTreeIndexedDBsNode. 70 TYPE_INDEXED_DBS, // This is used for CookieTreeIndexedDBsNode.
68 TYPE_INDEXED_DB, // This is used for CookieTreeIndexedDBNode. 71 TYPE_INDEXED_DB, // This is used for CookieTreeIndexedDBNode.
72 TYPE_FILE_SYSTEMS, // This is used for CookieTreeFileSystemsNode.
73 TYPE_FILE_SYSTEM, // This is used for CookieTreeFileSystemNode.
69 }; 74 };
70 75
71 // TODO(viettrungluu): Figure out whether we want to store |origin| as a 76 // TODO(viettrungluu): Figure out whether we want to store |origin| as a
72 // |string16| or a (UTF-8) |std::string|, and convert. Remove constructor 77 // |string16| or a (UTF-8) |std::string|, and convert. Remove constructor
73 // taking an |std::wstring|. 78 // taking an |std::wstring|.
74 DetailedInfo(const string16& origin, NodeType node_type, 79 DetailedInfo(const string16& origin, NodeType node_type,
75 const net::CookieMonster::CanonicalCookie* cookie, 80 const net::CookieMonster::CanonicalCookie* cookie,
76 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info, 81 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info,
77 const BrowsingDataLocalStorageHelper::LocalStorageInfo* 82 const BrowsingDataLocalStorageHelper::LocalStorageInfo*
78 local_storage_info, 83 local_storage_info,
79 const BrowsingDataLocalStorageHelper::LocalStorageInfo* 84 const BrowsingDataLocalStorageHelper::LocalStorageInfo*
80 session_storage_info, 85 session_storage_info,
81 const appcache::AppCacheInfo* appcache_info, 86 const appcache::AppCacheInfo* appcache_info,
82 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) 87 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info,
88 const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info)
83 : origin(UTF16ToWideHack(origin)), 89 : origin(UTF16ToWideHack(origin)),
84 node_type(node_type), 90 node_type(node_type),
85 cookie(cookie), 91 cookie(cookie),
86 database_info(database_info), 92 database_info(database_info),
87 local_storage_info(local_storage_info), 93 local_storage_info(local_storage_info),
88 session_storage_info(session_storage_info), 94 session_storage_info(session_storage_info),
89 appcache_info(appcache_info), 95 appcache_info(appcache_info),
90 indexed_db_info(indexed_db_info) { 96 indexed_db_info(indexed_db_info),
97 file_system_info(file_system_info) {
91 DCHECK((node_type != TYPE_DATABASE) || database_info); 98 DCHECK((node_type != TYPE_DATABASE) || database_info);
92 DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info); 99 DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info);
93 DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info); 100 DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info);
94 DCHECK((node_type != TYPE_APPCACHE) || appcache_info); 101 DCHECK((node_type != TYPE_APPCACHE) || appcache_info);
95 DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info); 102 DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info);
103 DCHECK((node_type != TYPE_FILE_SYSTEM) || file_system_info);
96 } 104 }
97 #if !defined(WCHAR_T_IS_UTF16) 105 #if !defined(WCHAR_T_IS_UTF16)
98 DetailedInfo(const std::wstring& origin, NodeType node_type, 106 DetailedInfo(const std::wstring& origin, NodeType node_type,
99 const net::CookieMonster::CanonicalCookie* cookie, 107 const net::CookieMonster::CanonicalCookie* cookie,
100 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info, 108 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info,
101 const BrowsingDataLocalStorageHelper::LocalStorageInfo* 109 const BrowsingDataLocalStorageHelper::LocalStorageInfo*
102 local_storage_info, 110 local_storage_info,
103 const BrowsingDataLocalStorageHelper::LocalStorageInfo* 111 const BrowsingDataLocalStorageHelper::LocalStorageInfo*
104 session_storage_info, 112 session_storage_info,
105 const appcache::AppCacheInfo* appcache_info, 113 const appcache::AppCacheInfo* appcache_info,
106 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) 114 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info,
115 const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info)
107 : origin(origin), 116 : origin(origin),
108 node_type(node_type), 117 node_type(node_type),
109 cookie(cookie), 118 cookie(cookie),
110 database_info(database_info), 119 database_info(database_info),
111 local_storage_info(local_storage_info), 120 local_storage_info(local_storage_info),
112 session_storage_info(session_storage_info), 121 session_storage_info(session_storage_info),
113 appcache_info(appcache_info), 122 appcache_info(appcache_info),
114 indexed_db_info(indexed_db_info) { 123 indexed_db_info(indexed_db_info),
124 file_system_info(file_system_info) {
115 DCHECK((node_type != TYPE_DATABASE) || database_info); 125 DCHECK((node_type != TYPE_DATABASE) || database_info);
116 DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info); 126 DCHECK((node_type != TYPE_LOCAL_STORAGE) || local_storage_info);
117 DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info); 127 DCHECK((node_type != TYPE_SESSION_STORAGE) || session_storage_info);
118 DCHECK((node_type != TYPE_APPCACHE) || appcache_info); 128 DCHECK((node_type != TYPE_APPCACHE) || appcache_info);
119 DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info); 129 DCHECK((node_type != TYPE_INDEXED_DB) || indexed_db_info);
130 DCHECK((node_type != TYPE_FILE_SYSTEM) || file_system_info);
120 } 131 }
121 #endif 132 #endif
122 133
123 std::wstring origin; 134 std::wstring origin;
124 NodeType node_type; 135 NodeType node_type;
125 const net::CookieMonster::CanonicalCookie* cookie; 136 const net::CookieMonster::CanonicalCookie* cookie;
126 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info; 137 const BrowsingDataDatabaseHelper::DatabaseInfo* database_info;
127 const BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info; 138 const BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info;
128 const BrowsingDataLocalStorageHelper::LocalStorageInfo* 139 const BrowsingDataLocalStorageHelper::LocalStorageInfo*
129 session_storage_info; 140 session_storage_info;
130 const appcache::AppCacheInfo* appcache_info; 141 const appcache::AppCacheInfo* appcache_info;
131 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info; 142 const BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info;
143 const BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info;
132 }; 144 };
133 145
134 CookieTreeNode() {} 146 CookieTreeNode() {}
135 explicit CookieTreeNode(const string16& title) 147 explicit CookieTreeNode(const string16& title)
136 : ui::TreeNode<CookieTreeNode>(title) {} 148 : ui::TreeNode<CookieTreeNode>(title) {}
137 virtual ~CookieTreeNode() {} 149 virtual ~CookieTreeNode() {}
138 150
139 // Delete backend storage for this node, and any children nodes. (E.g. delete 151 // Delete backend storage for this node, and any children nodes. (E.g. delete
140 // the cookie from CookieMonster, clear the database, and so forth.) 152 // the cookie from CookieMonster, clear the database, and so forth.)
141 virtual void DeleteStoredObjects(); 153 virtual void DeleteStoredObjects();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // CookieTreeNode methods: 203 // CookieTreeNode methods:
192 virtual DetailedInfo GetDetailedInfo() const; 204 virtual DetailedInfo GetDetailedInfo() const;
193 205
194 // CookieTreeOriginNode methods: 206 // CookieTreeOriginNode methods:
195 CookieTreeCookiesNode* GetOrCreateCookiesNode(); 207 CookieTreeCookiesNode* GetOrCreateCookiesNode();
196 CookieTreeDatabasesNode* GetOrCreateDatabasesNode(); 208 CookieTreeDatabasesNode* GetOrCreateDatabasesNode();
197 CookieTreeLocalStoragesNode* GetOrCreateLocalStoragesNode(); 209 CookieTreeLocalStoragesNode* GetOrCreateLocalStoragesNode();
198 CookieTreeSessionStoragesNode* GetOrCreateSessionStoragesNode(); 210 CookieTreeSessionStoragesNode* GetOrCreateSessionStoragesNode();
199 CookieTreeAppCachesNode* GetOrCreateAppCachesNode(); 211 CookieTreeAppCachesNode* GetOrCreateAppCachesNode();
200 CookieTreeIndexedDBsNode* GetOrCreateIndexedDBsNode(); 212 CookieTreeIndexedDBsNode* GetOrCreateIndexedDBsNode();
213 CookieTreeFileSystemsNode* GetOrCreateFileSystemsNode();
201 214
202 // Creates an content exception for this origin of type 215 // Creates an content exception for this origin of type
203 // CONTENT_SETTINGS_TYPE_COOKIES. 216 // CONTENT_SETTINGS_TYPE_COOKIES.
204 void CreateContentException(HostContentSettingsMap* content_settings, 217 void CreateContentException(HostContentSettingsMap* content_settings,
205 ContentSetting setting) const; 218 ContentSetting setting) const;
206 219
207 // True if a content exception can be created for this origin. 220 // True if a content exception can be created for this origin.
208 bool CanCreateContentException() const; 221 bool CanCreateContentException() const;
209 222
210 private: 223 private:
211 // Pointers to the cookies, databases, local and session storage and appcache 224 // Pointers to the cookies, databases, local and session storage and appcache
212 // nodes. When we build up the tree we need to quickly get a reference to 225 // nodes. When we build up the tree we need to quickly get a reference to
213 // the COOKIES node to add children. Checking each child and interrogating 226 // the COOKIES node to add children. Checking each child and interrogating
214 // them to see if they are a COOKIES, APPCACHES, DATABASES etc node seems 227 // them to see if they are a COOKIES, APPCACHES, DATABASES etc node seems
215 // less preferable than storing an extra pointer per origin. 228 // less preferable than storing an extra pointer per origin.
216 CookieTreeCookiesNode* cookies_child_; 229 CookieTreeCookiesNode* cookies_child_;
217 CookieTreeDatabasesNode* databases_child_; 230 CookieTreeDatabasesNode* databases_child_;
218 CookieTreeLocalStoragesNode* local_storages_child_; 231 CookieTreeLocalStoragesNode* local_storages_child_;
219 CookieTreeSessionStoragesNode* session_storages_child_; 232 CookieTreeSessionStoragesNode* session_storages_child_;
220 CookieTreeAppCachesNode* appcaches_child_; 233 CookieTreeAppCachesNode* appcaches_child_;
221 CookieTreeIndexedDBsNode* indexed_dbs_child_; 234 CookieTreeIndexedDBsNode* indexed_dbs_child_;
235 CookieTreeFileSystemsNode* file_systems_child_;
222 236
223 // The URL for which this node was initially created. 237 // The URL for which this node was initially created.
224 GURL url_; 238 GURL url_;
225 239
226 DISALLOW_COPY_AND_ASSIGN(CookieTreeOriginNode); 240 DISALLOW_COPY_AND_ASSIGN(CookieTreeOriginNode);
227 }; 241 };
228 242
229 // CookieTreeCookieNode ------------------------------------------------------ 243 // CookieTreeCookieNode ------------------------------------------------------
230 class CookieTreeCookieNode : public CookieTreeNode { 244 class CookieTreeCookieNode : public CookieTreeNode {
231 public: 245 public:
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 virtual DetailedInfo GetDetailedInfo() const; 341 virtual DetailedInfo GetDetailedInfo() const;
328 342
329 void AddDatabaseNode(CookieTreeDatabaseNode* child) { 343 void AddDatabaseNode(CookieTreeDatabaseNode* child) {
330 AddChildSortedByTitle(child); 344 AddChildSortedByTitle(child);
331 } 345 }
332 346
333 private: 347 private:
334 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode); 348 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode);
335 }; 349 };
336 350
351 // CookieTreeFileSystemNode --------------------------------------------------
352 class CookieTreeFileSystemNode : public CookieTreeNode {
353 public:
354 friend class CookieTreeFileSystemsNode;
355
356 // Does not take ownership of file_system_info, and file_system_info should
357 // remain valid at least as long as the CookieTreeFileSystemNode is valid.
358 explicit CookieTreeFileSystemNode(
359 BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info);
360 virtual ~CookieTreeFileSystemNode();
361
362 virtual void DeleteStoredObjects();
363 virtual DetailedInfo GetDetailedInfo() const;
364
365 private:
366 // file_system_info_ is not owned by the node, and is expected to remain
367 // valid as long as the CookieTreeFileSystemNode is valid.
368 BrowsingDataFileSystemHelper::FileSystemInfo* file_system_info_;
369
370 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemNode);
371 };
372
373 class CookieTreeFileSystemsNode : public CookieTreeNode {
374 public:
375 CookieTreeFileSystemsNode();
376 virtual ~CookieTreeFileSystemsNode();
377
378 virtual DetailedInfo GetDetailedInfo() const;
379
380 void AddFileSystemNode(CookieTreeFileSystemNode* child) {
381 AddChildSortedByTitle(child);
382 }
383
384 private:
385 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemsNode);
386 };
337 387
338 // CookieTreeLocalStorageNode ------------------------------------------------- 388 // CookieTreeLocalStorageNode -------------------------------------------------
339 class CookieTreeLocalStorageNode : public CookieTreeNode { 389 class CookieTreeLocalStorageNode : public CookieTreeNode {
340 public: 390 public:
341 // Does not take ownership of local_storage_info, and local_storage_info 391 // Does not take ownership of local_storage_info, and local_storage_info
342 // should remain valid at least as long as the CookieTreeLocalStorageNode is 392 // should remain valid at least as long as the CookieTreeLocalStorageNode is
343 // valid. 393 // valid.
344 explicit CookieTreeLocalStorageNode( 394 explicit CookieTreeLocalStorageNode(
345 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info); 395 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info);
346 virtual ~CookieTreeLocalStorageNode(); 396 virtual ~CookieTreeLocalStorageNode();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 virtual void TreeModelEndBatch(CookiesTreeModel* model) {} 513 virtual void TreeModelEndBatch(CookiesTreeModel* model) {}
464 }; 514 };
465 515
466 CookiesTreeModel( 516 CookiesTreeModel(
467 net::CookieMonster* cookie_monster_, 517 net::CookieMonster* cookie_monster_,
468 BrowsingDataDatabaseHelper* database_helper, 518 BrowsingDataDatabaseHelper* database_helper,
469 BrowsingDataLocalStorageHelper* local_storage_helper, 519 BrowsingDataLocalStorageHelper* local_storage_helper,
470 BrowsingDataLocalStorageHelper* session_storage_helper, 520 BrowsingDataLocalStorageHelper* session_storage_helper,
471 BrowsingDataAppCacheHelper* appcache_helper, 521 BrowsingDataAppCacheHelper* appcache_helper,
472 BrowsingDataIndexedDBHelper* indexed_db_helper, 522 BrowsingDataIndexedDBHelper* indexed_db_helper,
523 BrowsingDataFileSystemHelper* file_system_helper,
473 bool use_cookie_source); 524 bool use_cookie_source);
474 virtual ~CookiesTreeModel(); 525 virtual ~CookiesTreeModel();
475 526
476 // ui::TreeModel methods: 527 // ui::TreeModel methods:
477 // Returns the set of icons for the nodes in the tree. You only need override 528 // Returns the set of icons for the nodes in the tree. You only need override
478 // this if you don't want to use the default folder icons. 529 // this if you don't want to use the default folder icons.
479 virtual void GetIcons(std::vector<SkBitmap>* icons); 530 virtual void GetIcons(std::vector<SkBitmap>* icons);
480 531
481 // Returns the index of the icon to use for |node|. Return -1 to use the 532 // Returns the index of the icon to use for |node|. Return -1 to use the
482 // default icon. The index is relative to the list of icons returned from 533 // default icon. The index is relative to the list of icons returned from
(...skipping 22 matching lines...) Expand all
505 }; 556 };
506 typedef net::CookieList CookieList; 557 typedef net::CookieList CookieList;
507 typedef std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> 558 typedef std::vector<BrowsingDataDatabaseHelper::DatabaseInfo>
508 DatabaseInfoList; 559 DatabaseInfoList;
509 typedef std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo> 560 typedef std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo>
510 LocalStorageInfoList; 561 LocalStorageInfoList;
511 typedef std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo> 562 typedef std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo>
512 SessionStorageInfoList; 563 SessionStorageInfoList;
513 typedef std::vector<BrowsingDataIndexedDBHelper::IndexedDBInfo> 564 typedef std::vector<BrowsingDataIndexedDBHelper::IndexedDBInfo>
514 IndexedDBInfoList; 565 IndexedDBInfoList;
566 typedef std::vector<BrowsingDataFileSystemHelper::FileSystemInfo>
567 FileSystemInfoList;
515 568
516 void LoadCookies(); 569 void LoadCookies();
517 void LoadCookiesWithFilter(const std::wstring& filter); 570 void LoadCookiesWithFilter(const std::wstring& filter);
518 571
519 void OnAppCacheModelInfoLoaded(); 572 void OnAppCacheModelInfoLoaded();
520 void OnDatabaseModelInfoLoaded(const DatabaseInfoList& database_info); 573 void OnDatabaseModelInfoLoaded(const DatabaseInfoList& database_info);
521 void OnLocalStorageModelInfoLoaded( 574 void OnLocalStorageModelInfoLoaded(
522 const LocalStorageInfoList& local_storage_info); 575 const LocalStorageInfoList& local_storage_info);
523 void OnSessionStorageModelInfoLoaded( 576 void OnSessionStorageModelInfoLoaded(
524 const LocalStorageInfoList& local_storage_info); 577 const LocalStorageInfoList& local_storage_info);
525 void OnIndexedDBModelInfoLoaded( 578 void OnIndexedDBModelInfoLoaded(
526 const IndexedDBInfoList& indexed_db_info); 579 const IndexedDBInfoList& indexed_db_info);
580 void OnFileSystemModelInfoLoaded(
581 const FileSystemInfoList& file_system_info);
527 582
528 void PopulateAppCacheInfoWithFilter(const std::wstring& filter); 583 void PopulateAppCacheInfoWithFilter(const std::wstring& filter);
529 void PopulateDatabaseInfoWithFilter(const std::wstring& filter); 584 void PopulateDatabaseInfoWithFilter(const std::wstring& filter);
530 void PopulateLocalStorageInfoWithFilter(const std::wstring& filter); 585 void PopulateLocalStorageInfoWithFilter(const std::wstring& filter);
531 void PopulateSessionStorageInfoWithFilter(const std::wstring& filter); 586 void PopulateSessionStorageInfoWithFilter(const std::wstring& filter);
532 void PopulateIndexedDBInfoWithFilter(const std::wstring& filter); 587 void PopulateIndexedDBInfoWithFilter(const std::wstring& filter);
588 void PopulateFileSystemInfoWithFilter(const std::wstring& filter);
533 589
534 void NotifyObserverBeginBatch(); 590 void NotifyObserverBeginBatch();
535 void NotifyObserverEndBatch(); 591 void NotifyObserverEndBatch();
536 592
537 scoped_refptr<net::CookieMonster> cookie_monster_; 593 scoped_refptr<net::CookieMonster> cookie_monster_;
538 CookieList all_cookies_; 594 CookieList all_cookies_;
539 595
540 scoped_refptr<BrowsingDataAppCacheHelper> appcache_helper_; 596 scoped_refptr<BrowsingDataAppCacheHelper> appcache_helper_;
541 scoped_refptr<BrowsingDataDatabaseHelper> database_helper_; 597 scoped_refptr<BrowsingDataDatabaseHelper> database_helper_;
542 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; 598 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
543 DatabaseInfoList database_info_list_; 599 DatabaseInfoList database_info_list_;
544 600
545 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper_; 601 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper_;
546 scoped_refptr<BrowsingDataLocalStorageHelper> session_storage_helper_; 602 scoped_refptr<BrowsingDataLocalStorageHelper> session_storage_helper_;
547 scoped_refptr<BrowsingDataIndexedDBHelper> indexed_db_helper_; 603 scoped_refptr<BrowsingDataIndexedDBHelper> indexed_db_helper_;
604 scoped_refptr<BrowsingDataFileSystemHelper> file_system_helper_;
548 LocalStorageInfoList local_storage_info_list_; 605 LocalStorageInfoList local_storage_info_list_;
549 LocalStorageInfoList session_storage_info_list_; 606 LocalStorageInfoList session_storage_info_list_;
550 IndexedDBInfoList indexed_db_info_list_; 607 IndexedDBInfoList indexed_db_info_list_;
608 FileSystemInfoList file_system_info_list_;
551 609
552 // The CookiesTreeModel maintains a separate list of observers that are 610 // The CookiesTreeModel maintains a separate list of observers that are
553 // specifically of the type CookiesTreeModel::Observer. 611 // specifically of the type CookiesTreeModel::Observer.
554 ObserverList<Observer> cookies_observer_list_; 612 ObserverList<Observer> cookies_observer_list_;
555 613
556 // If this is non-zero, then this model is batching updates (there's a lot of 614 // If this is non-zero, then this model is batching updates (there's a lot of
557 // notifications coming down the pipe). This is an integer is used to balance 615 // notifications coming down the pipe). This is an integer is used to balance
558 // calls to Begin/EndBatch() if they're called in a nested manner. 616 // calls to Begin/EndBatch() if they're called in a nested manner.
559 int batch_update_; 617 int batch_update_;
560 618
561 // If true, use the CanonicalCookie::Source attribute to group cookies. 619 // If true, use the CanonicalCookie::Source attribute to group cookies.
562 // Otherwise, use the CanonicalCookie::Domain attribute. 620 // Otherwise, use the CanonicalCookie::Domain attribute.
563 bool use_cookie_source_; 621 bool use_cookie_source_;
564 622
565 friend class CookieTreeAppCacheNode; 623 friend class CookieTreeAppCacheNode;
566 friend class CookieTreeCookieNode; 624 friend class CookieTreeCookieNode;
567 friend class CookieTreeDatabaseNode; 625 friend class CookieTreeDatabaseNode;
568 friend class CookieTreeLocalStorageNode; 626 friend class CookieTreeLocalStorageNode;
569 friend class CookieTreeIndexedDBNode; 627 friend class CookieTreeIndexedDBNode;
628 friend class CookieTreeFileSystemNode;
570 629
571 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel); 630 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel);
572 }; 631 };
573 632
574 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_ 633 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings_unittest.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698