| 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 #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). |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // CookieTreeRootNode --------------------------------------------------------- | 187 // CookieTreeRootNode --------------------------------------------------------- |
| 188 // The node at the root of the CookieTree that gets inserted into the view. | 188 // The node at the root of the CookieTree that gets inserted into the view. |
| 189 class CookieTreeRootNode : public CookieTreeNode { | 189 class CookieTreeRootNode : public CookieTreeNode { |
| 190 public: | 190 public: |
| 191 explicit CookieTreeRootNode(CookiesTreeModel* model); | 191 explicit CookieTreeRootNode(CookiesTreeModel* model); |
| 192 virtual ~CookieTreeRootNode(); | 192 virtual ~CookieTreeRootNode(); |
| 193 | 193 |
| 194 CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url); | 194 CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url); |
| 195 | 195 |
| 196 // CookieTreeNode methods: | 196 // CookieTreeNode methods: |
| 197 virtual CookiesTreeModel* GetModel() const; | 197 virtual CookiesTreeModel* GetModel() const OVERRIDE; |
| 198 virtual DetailedInfo GetDetailedInfo() const; | 198 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 199 | 199 |
| 200 private: | 200 private: |
| 201 CookiesTreeModel* model_; | 201 CookiesTreeModel* model_; |
| 202 | 202 |
| 203 DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode); | 203 DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode); |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 // CookieTreeOriginNode ------------------------------------------------------- | 206 // CookieTreeOriginNode ------------------------------------------------------- |
| 207 class CookieTreeOriginNode : public CookieTreeNode { | 207 class CookieTreeOriginNode : public CookieTreeNode { |
| 208 public: | 208 public: |
| 209 // Returns the origin node's title to use for a given URL. | 209 // Returns the origin node's title to use for a given URL. |
| 210 static std::wstring TitleForUrl(const GURL& url); | 210 static std::wstring TitleForUrl(const GURL& url); |
| 211 | 211 |
| 212 explicit CookieTreeOriginNode(const GURL& url); | 212 explicit CookieTreeOriginNode(const GURL& url); |
| 213 virtual ~CookieTreeOriginNode(); | 213 virtual ~CookieTreeOriginNode(); |
| 214 | 214 |
| 215 // CookieTreeNode methods: | 215 // CookieTreeNode methods: |
| 216 virtual DetailedInfo GetDetailedInfo() const; | 216 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 217 | 217 |
| 218 // CookieTreeOriginNode methods: | 218 // CookieTreeOriginNode methods: |
| 219 CookieTreeCookiesNode* GetOrCreateCookiesNode(); | 219 CookieTreeCookiesNode* GetOrCreateCookiesNode(); |
| 220 CookieTreeDatabasesNode* GetOrCreateDatabasesNode(); | 220 CookieTreeDatabasesNode* GetOrCreateDatabasesNode(); |
| 221 CookieTreeLocalStoragesNode* GetOrCreateLocalStoragesNode(); | 221 CookieTreeLocalStoragesNode* GetOrCreateLocalStoragesNode(); |
| 222 CookieTreeSessionStoragesNode* GetOrCreateSessionStoragesNode(); | 222 CookieTreeSessionStoragesNode* GetOrCreateSessionStoragesNode(); |
| 223 CookieTreeAppCachesNode* GetOrCreateAppCachesNode(); | 223 CookieTreeAppCachesNode* GetOrCreateAppCachesNode(); |
| 224 CookieTreeIndexedDBsNode* GetOrCreateIndexedDBsNode(); | 224 CookieTreeIndexedDBsNode* GetOrCreateIndexedDBsNode(); |
| 225 CookieTreeFileSystemsNode* GetOrCreateFileSystemsNode(); | 225 CookieTreeFileSystemsNode* GetOrCreateFileSystemsNode(); |
| 226 CookieTreeQuotaNode* UpdateOrCreateQuotaNode( | 226 CookieTreeQuotaNode* UpdateOrCreateQuotaNode( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 public: | 260 public: |
| 261 friend class CookieTreeCookiesNode; | 261 friend class CookieTreeCookiesNode; |
| 262 | 262 |
| 263 // The cookie should remain valid at least as long as the | 263 // The cookie should remain valid at least as long as the |
| 264 // CookieTreeCookieNode is valid. | 264 // CookieTreeCookieNode is valid. |
| 265 explicit CookieTreeCookieNode( | 265 explicit CookieTreeCookieNode( |
| 266 std::list<net::CookieMonster::CanonicalCookie>::iterator cookie); | 266 std::list<net::CookieMonster::CanonicalCookie>::iterator cookie); |
| 267 virtual ~CookieTreeCookieNode(); | 267 virtual ~CookieTreeCookieNode(); |
| 268 | 268 |
| 269 // CookieTreeNode methods: | 269 // CookieTreeNode methods: |
| 270 virtual void DeleteStoredObjects(); | 270 virtual void DeleteStoredObjects() OVERRIDE; |
| 271 virtual DetailedInfo GetDetailedInfo() const; | 271 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 272 | 272 |
| 273 private: | 273 private: |
| 274 // cookie_ is expected to remain valid as long as the CookieTreeCookieNode is | 274 // cookie_ is expected to remain valid as long as the CookieTreeCookieNode is |
| 275 // valid. | 275 // valid. |
| 276 std::list<net::CookieMonster::CanonicalCookie>::iterator cookie_; | 276 std::list<net::CookieMonster::CanonicalCookie>::iterator cookie_; |
| 277 | 277 |
| 278 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookieNode); | 278 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookieNode); |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 class CookieTreeCookiesNode : public CookieTreeNode { | 281 class CookieTreeCookiesNode : public CookieTreeNode { |
| 282 public: | 282 public: |
| 283 CookieTreeCookiesNode(); | 283 CookieTreeCookiesNode(); |
| 284 virtual ~CookieTreeCookiesNode(); | 284 virtual ~CookieTreeCookiesNode(); |
| 285 | 285 |
| 286 virtual DetailedInfo GetDetailedInfo() const; | 286 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 287 | 287 |
| 288 void AddCookieNode(CookieTreeCookieNode* child) { | 288 void AddCookieNode(CookieTreeCookieNode* child) { |
| 289 AddChildSortedByTitle(child); | 289 AddChildSortedByTitle(child); |
| 290 } | 290 } |
| 291 | 291 |
| 292 private: | 292 private: |
| 293 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookiesNode); | 293 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookiesNode); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 // CookieTreeAppCacheNode ----------------------------------------------------- | 296 // CookieTreeAppCacheNode ----------------------------------------------------- |
| 297 class CookieTreeAppCacheNode : public CookieTreeNode { | 297 class CookieTreeAppCacheNode : public CookieTreeNode { |
| 298 public: | 298 public: |
| 299 friend class CookieTreeAppCachesNode; | 299 friend class CookieTreeAppCachesNode; |
| 300 | 300 |
| 301 // appcache_info should remain valid at least as long as the | 301 // appcache_info should remain valid at least as long as the |
| 302 // CookieTreeAppCacheNode is valid. | 302 // CookieTreeAppCacheNode is valid. |
| 303 explicit CookieTreeAppCacheNode( | 303 explicit CookieTreeAppCacheNode( |
| 304 const GURL& origin_url, | 304 const GURL& origin_url, |
| 305 std::list<appcache::AppCacheInfo>::iterator appcache_info); | 305 std::list<appcache::AppCacheInfo>::iterator appcache_info); |
| 306 virtual ~CookieTreeAppCacheNode(); | 306 virtual ~CookieTreeAppCacheNode(); |
| 307 | 307 |
| 308 virtual void DeleteStoredObjects(); | 308 virtual void DeleteStoredObjects() OVERRIDE; |
| 309 virtual DetailedInfo GetDetailedInfo() const; | 309 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 310 | 310 |
| 311 private: | 311 private: |
| 312 GURL origin_url_; | 312 GURL origin_url_; |
| 313 std::list<appcache::AppCacheInfo>::iterator appcache_info_; | 313 std::list<appcache::AppCacheInfo>::iterator appcache_info_; |
| 314 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCacheNode); | 314 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCacheNode); |
| 315 }; | 315 }; |
| 316 | 316 |
| 317 class CookieTreeAppCachesNode : public CookieTreeNode { | 317 class CookieTreeAppCachesNode : public CookieTreeNode { |
| 318 public: | 318 public: |
| 319 CookieTreeAppCachesNode(); | 319 CookieTreeAppCachesNode(); |
| 320 virtual ~CookieTreeAppCachesNode(); | 320 virtual ~CookieTreeAppCachesNode(); |
| 321 | 321 |
| 322 virtual DetailedInfo GetDetailedInfo() const; | 322 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 323 | 323 |
| 324 void AddAppCacheNode(CookieTreeAppCacheNode* child) { | 324 void AddAppCacheNode(CookieTreeAppCacheNode* child) { |
| 325 AddChildSortedByTitle(child); | 325 AddChildSortedByTitle(child); |
| 326 } | 326 } |
| 327 | 327 |
| 328 private: | 328 private: |
| 329 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCachesNode); | 329 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCachesNode); |
| 330 }; | 330 }; |
| 331 | 331 |
| 332 // CookieTreeDatabaseNode ----------------------------------------------------- | 332 // CookieTreeDatabaseNode ----------------------------------------------------- |
| 333 class CookieTreeDatabaseNode : public CookieTreeNode { | 333 class CookieTreeDatabaseNode : public CookieTreeNode { |
| 334 public: | 334 public: |
| 335 friend class CookieTreeDatabasesNode; | 335 friend class CookieTreeDatabasesNode; |
| 336 | 336 |
| 337 // database_info should remain valid at least as long as the | 337 // database_info should remain valid at least as long as the |
| 338 // CookieTreeDatabaseNode is valid. | 338 // CookieTreeDatabaseNode is valid. |
| 339 explicit CookieTreeDatabaseNode( | 339 explicit CookieTreeDatabaseNode( |
| 340 std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator | 340 std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator |
| 341 database_info); | 341 database_info); |
| 342 virtual ~CookieTreeDatabaseNode(); | 342 virtual ~CookieTreeDatabaseNode(); |
| 343 | 343 |
| 344 virtual void DeleteStoredObjects(); | 344 virtual void DeleteStoredObjects() OVERRIDE; |
| 345 virtual DetailedInfo GetDetailedInfo() const; | 345 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 346 | 346 |
| 347 private: | 347 private: |
| 348 // database_info_ is expected to remain valid as long as the | 348 // database_info_ is expected to remain valid as long as the |
| 349 // CookieTreeDatabaseNode is valid. | 349 // CookieTreeDatabaseNode is valid. |
| 350 std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator | 350 std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator |
| 351 database_info_; | 351 database_info_; |
| 352 | 352 |
| 353 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabaseNode); | 353 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabaseNode); |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 class CookieTreeDatabasesNode : public CookieTreeNode { | 356 class CookieTreeDatabasesNode : public CookieTreeNode { |
| 357 public: | 357 public: |
| 358 CookieTreeDatabasesNode(); | 358 CookieTreeDatabasesNode(); |
| 359 virtual ~CookieTreeDatabasesNode(); | 359 virtual ~CookieTreeDatabasesNode(); |
| 360 | 360 |
| 361 virtual DetailedInfo GetDetailedInfo() const; | 361 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 362 | 362 |
| 363 void AddDatabaseNode(CookieTreeDatabaseNode* child) { | 363 void AddDatabaseNode(CookieTreeDatabaseNode* child) { |
| 364 AddChildSortedByTitle(child); | 364 AddChildSortedByTitle(child); |
| 365 } | 365 } |
| 366 | 366 |
| 367 private: | 367 private: |
| 368 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode); | 368 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode); |
| 369 }; | 369 }; |
| 370 | 370 |
| 371 // CookieTreeFileSystemNode -------------------------------------------------- | 371 // CookieTreeFileSystemNode -------------------------------------------------- |
| 372 class CookieTreeFileSystemNode : public CookieTreeNode { | 372 class CookieTreeFileSystemNode : public CookieTreeNode { |
| 373 public: | 373 public: |
| 374 friend class CookieTreeFileSystemsNode; | 374 friend class CookieTreeFileSystemsNode; |
| 375 | 375 |
| 376 // file_system_info should remain valid at least as long as the | 376 // file_system_info should remain valid at least as long as the |
| 377 // CookieTreeFileSystemNode is valid. | 377 // CookieTreeFileSystemNode is valid. |
| 378 explicit CookieTreeFileSystemNode( | 378 explicit CookieTreeFileSystemNode( |
| 379 std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator | 379 std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator |
| 380 file_system_info); | 380 file_system_info); |
| 381 virtual ~CookieTreeFileSystemNode(); | 381 virtual ~CookieTreeFileSystemNode(); |
| 382 | 382 |
| 383 virtual void DeleteStoredObjects(); | 383 virtual void DeleteStoredObjects() OVERRIDE; |
| 384 virtual DetailedInfo GetDetailedInfo() const; | 384 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 385 | 385 |
| 386 private: | 386 private: |
| 387 // file_system_info_ expected to remain valid as long as the | 387 // file_system_info_ expected to remain valid as long as the |
| 388 // CookieTreeFileSystemNode is valid. | 388 // CookieTreeFileSystemNode is valid. |
| 389 std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator | 389 std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator |
| 390 file_system_info_; | 390 file_system_info_; |
| 391 | 391 |
| 392 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemNode); | 392 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemNode); |
| 393 }; | 393 }; |
| 394 | 394 |
| 395 class CookieTreeFileSystemsNode : public CookieTreeNode { | 395 class CookieTreeFileSystemsNode : public CookieTreeNode { |
| 396 public: | 396 public: |
| 397 CookieTreeFileSystemsNode(); | 397 CookieTreeFileSystemsNode(); |
| 398 virtual ~CookieTreeFileSystemsNode(); | 398 virtual ~CookieTreeFileSystemsNode(); |
| 399 | 399 |
| 400 virtual DetailedInfo GetDetailedInfo() const; | 400 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 401 | 401 |
| 402 void AddFileSystemNode(CookieTreeFileSystemNode* child) { | 402 void AddFileSystemNode(CookieTreeFileSystemNode* child) { |
| 403 AddChildSortedByTitle(child); | 403 AddChildSortedByTitle(child); |
| 404 } | 404 } |
| 405 | 405 |
| 406 private: | 406 private: |
| 407 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemsNode); | 407 DISALLOW_COPY_AND_ASSIGN(CookieTreeFileSystemsNode); |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 // CookieTreeLocalStorageNode ------------------------------------------------- | 410 // CookieTreeLocalStorageNode ------------------------------------------------- |
| 411 class CookieTreeLocalStorageNode : public CookieTreeNode { | 411 class CookieTreeLocalStorageNode : public CookieTreeNode { |
| 412 public: | 412 public: |
| 413 // local_storage_info should remain valid at least as long as the | 413 // local_storage_info should remain valid at least as long as the |
| 414 // CookieTreeLocalStorageNode is valid. | 414 // CookieTreeLocalStorageNode is valid. |
| 415 explicit CookieTreeLocalStorageNode( | 415 explicit CookieTreeLocalStorageNode( |
| 416 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator | 416 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 417 local_storage_info); | 417 local_storage_info); |
| 418 virtual ~CookieTreeLocalStorageNode(); | 418 virtual ~CookieTreeLocalStorageNode(); |
| 419 | 419 |
| 420 // CookieTreeNode methods: | 420 // CookieTreeNode methods: |
| 421 virtual void DeleteStoredObjects(); | 421 virtual void DeleteStoredObjects() OVERRIDE; |
| 422 virtual DetailedInfo GetDetailedInfo() const; | 422 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 423 | 423 |
| 424 private: | 424 private: |
| 425 // local_storage_info_ is expected to remain valid as long as the | 425 // local_storage_info_ is expected to remain valid as long as the |
| 426 // CookieTreeLocalStorageNode is valid. | 426 // CookieTreeLocalStorageNode is valid. |
| 427 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator | 427 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 428 local_storage_info_; | 428 local_storage_info_; |
| 429 | 429 |
| 430 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStorageNode); | 430 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStorageNode); |
| 431 }; | 431 }; |
| 432 | 432 |
| 433 class CookieTreeLocalStoragesNode : public CookieTreeNode { | 433 class CookieTreeLocalStoragesNode : public CookieTreeNode { |
| 434 public: | 434 public: |
| 435 CookieTreeLocalStoragesNode(); | 435 CookieTreeLocalStoragesNode(); |
| 436 virtual ~CookieTreeLocalStoragesNode(); | 436 virtual ~CookieTreeLocalStoragesNode(); |
| 437 | 437 |
| 438 virtual DetailedInfo GetDetailedInfo() const; | 438 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 439 | 439 |
| 440 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) { | 440 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) { |
| 441 AddChildSortedByTitle(child); | 441 AddChildSortedByTitle(child); |
| 442 } | 442 } |
| 443 | 443 |
| 444 private: | 444 private: |
| 445 | 445 |
| 446 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode); | 446 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode); |
| 447 }; | 447 }; |
| 448 | 448 |
| 449 | 449 |
| 450 // CookieTreeSessionStorageNode ----------------------------------------------- | 450 // CookieTreeSessionStorageNode ----------------------------------------------- |
| 451 class CookieTreeSessionStorageNode : public CookieTreeNode { | 451 class CookieTreeSessionStorageNode : public CookieTreeNode { |
| 452 public: | 452 public: |
| 453 // session_storage_info should remain valid at least as long as the | 453 // session_storage_info should remain valid at least as long as the |
| 454 // CookieTreeSessionStorageNode is valid. | 454 // CookieTreeSessionStorageNode is valid. |
| 455 explicit CookieTreeSessionStorageNode( | 455 explicit CookieTreeSessionStorageNode( |
| 456 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator | 456 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 457 session_storage_info); | 457 session_storage_info); |
| 458 virtual ~CookieTreeSessionStorageNode(); | 458 virtual ~CookieTreeSessionStorageNode(); |
| 459 | 459 |
| 460 // CookieTreeNode methods: | 460 // CookieTreeNode methods: |
| 461 virtual void DeleteStoredObjects(); | 461 virtual void DeleteStoredObjects() OVERRIDE; |
| 462 virtual DetailedInfo GetDetailedInfo() const; | 462 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 463 | 463 |
| 464 private: | 464 private: |
| 465 // session_storage_info_ is expected to remain valid as long as the | 465 // session_storage_info_ is expected to remain valid as long as the |
| 466 // CookieTreeSessionStorageNode is valid. | 466 // CookieTreeSessionStorageNode is valid. |
| 467 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator | 467 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator |
| 468 session_storage_info_; | 468 session_storage_info_; |
| 469 | 469 |
| 470 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStorageNode); | 470 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStorageNode); |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 class CookieTreeSessionStoragesNode : public CookieTreeNode { | 473 class CookieTreeSessionStoragesNode : public CookieTreeNode { |
| 474 public: | 474 public: |
| 475 CookieTreeSessionStoragesNode(); | 475 CookieTreeSessionStoragesNode(); |
| 476 virtual ~CookieTreeSessionStoragesNode(); | 476 virtual ~CookieTreeSessionStoragesNode(); |
| 477 | 477 |
| 478 virtual DetailedInfo GetDetailedInfo() const; | 478 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 479 | 479 |
| 480 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) { | 480 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) { |
| 481 AddChildSortedByTitle(child); | 481 AddChildSortedByTitle(child); |
| 482 } | 482 } |
| 483 | 483 |
| 484 private: | 484 private: |
| 485 | 485 |
| 486 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode); | 486 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode); |
| 487 }; | 487 }; |
| 488 | 488 |
| 489 // CookieTreeIndexedDBNode ----------------------------------------------- | 489 // CookieTreeIndexedDBNode ----------------------------------------------- |
| 490 class CookieTreeIndexedDBNode : public CookieTreeNode { | 490 class CookieTreeIndexedDBNode : public CookieTreeNode { |
| 491 public: | 491 public: |
| 492 // indexed_db_info should remain valid at least as long as the | 492 // indexed_db_info should remain valid at least as long as the |
| 493 // CookieTreeIndexedDBNode is valid. | 493 // CookieTreeIndexedDBNode is valid. |
| 494 explicit CookieTreeIndexedDBNode( | 494 explicit CookieTreeIndexedDBNode( |
| 495 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator | 495 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator |
| 496 indexed_db_info); | 496 indexed_db_info); |
| 497 virtual ~CookieTreeIndexedDBNode(); | 497 virtual ~CookieTreeIndexedDBNode(); |
| 498 | 498 |
| 499 // CookieTreeNode methods: | 499 // CookieTreeNode methods: |
| 500 virtual void DeleteStoredObjects(); | 500 virtual void DeleteStoredObjects() OVERRIDE; |
| 501 virtual DetailedInfo GetDetailedInfo() const; | 501 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 502 | 502 |
| 503 private: | 503 private: |
| 504 // indexed_db_info_ is expected to remain valid as long as the | 504 // indexed_db_info_ is expected to remain valid as long as the |
| 505 // CookieTreeIndexedDBNode is valid. | 505 // CookieTreeIndexedDBNode is valid. |
| 506 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator | 506 std::list<BrowsingDataIndexedDBHelper::IndexedDBInfo>::iterator |
| 507 indexed_db_info_; | 507 indexed_db_info_; |
| 508 | 508 |
| 509 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBNode); | 509 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBNode); |
| 510 }; | 510 }; |
| 511 | 511 |
| 512 class CookieTreeIndexedDBsNode : public CookieTreeNode { | 512 class CookieTreeIndexedDBsNode : public CookieTreeNode { |
| 513 public: | 513 public: |
| 514 CookieTreeIndexedDBsNode(); | 514 CookieTreeIndexedDBsNode(); |
| 515 virtual ~CookieTreeIndexedDBsNode(); | 515 virtual ~CookieTreeIndexedDBsNode(); |
| 516 | 516 |
| 517 virtual DetailedInfo GetDetailedInfo() const; | 517 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 518 | 518 |
| 519 void AddIndexedDBNode(CookieTreeIndexedDBNode* child) { | 519 void AddIndexedDBNode(CookieTreeIndexedDBNode* child) { |
| 520 AddChildSortedByTitle(child); | 520 AddChildSortedByTitle(child); |
| 521 } | 521 } |
| 522 | 522 |
| 523 private: | 523 private: |
| 524 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBsNode); | 524 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBsNode); |
| 525 }; | 525 }; |
| 526 | 526 |
| 527 // CookieTreeQuotaNode -------------------------------------------------- | 527 // CookieTreeQuotaNode -------------------------------------------------- |
| 528 class CookieTreeQuotaNode : public CookieTreeNode { | 528 class CookieTreeQuotaNode : public CookieTreeNode { |
| 529 public: | 529 public: |
| 530 // quota_info should remain valid at least as long as the CookieTreeQuotaNode | 530 // quota_info should remain valid at least as long as the CookieTreeQuotaNode |
| 531 // is valid. | 531 // is valid. |
| 532 explicit CookieTreeQuotaNode( | 532 explicit CookieTreeQuotaNode( |
| 533 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info); | 533 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info); |
| 534 virtual ~CookieTreeQuotaNode(); | 534 virtual ~CookieTreeQuotaNode(); |
| 535 | 535 |
| 536 virtual void DeleteStoredObjects(); | 536 virtual void DeleteStoredObjects() OVERRIDE; |
| 537 virtual DetailedInfo GetDetailedInfo() const; | 537 virtual DetailedInfo GetDetailedInfo() const OVERRIDE; |
| 538 | 538 |
| 539 private: | 539 private: |
| 540 // quota_info_ is expected to remain valid as long as the CookieTreeQuotaNode | 540 // quota_info_ is expected to remain valid as long as the CookieTreeQuotaNode |
| 541 // is valid. | 541 // is valid. |
| 542 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info_; | 542 std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info_; |
| 543 | 543 |
| 544 DISALLOW_COPY_AND_ASSIGN(CookieTreeQuotaNode); | 544 DISALLOW_COPY_AND_ASSIGN(CookieTreeQuotaNode); |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 // CookiesTreeModel ----------------------------------------------------------- | 547 // CookiesTreeModel ----------------------------------------------------------- |
| (...skipping 18 matching lines...) Expand all Loading... |
| 566 BrowsingDataAppCacheHelper* appcache_helper, | 566 BrowsingDataAppCacheHelper* appcache_helper, |
| 567 BrowsingDataIndexedDBHelper* indexed_db_helper, | 567 BrowsingDataIndexedDBHelper* indexed_db_helper, |
| 568 BrowsingDataFileSystemHelper* file_system_helper, | 568 BrowsingDataFileSystemHelper* file_system_helper, |
| 569 BrowsingDataQuotaHelper* quota_helper, | 569 BrowsingDataQuotaHelper* quota_helper, |
| 570 bool use_cookie_source); | 570 bool use_cookie_source); |
| 571 virtual ~CookiesTreeModel(); | 571 virtual ~CookiesTreeModel(); |
| 572 | 572 |
| 573 // ui::TreeModel methods: | 573 // ui::TreeModel methods: |
| 574 // Returns the set of icons for the nodes in the tree. You only need override | 574 // Returns the set of icons for the nodes in the tree. You only need override |
| 575 // this if you don't want to use the default folder icons. | 575 // this if you don't want to use the default folder icons. |
| 576 virtual void GetIcons(std::vector<SkBitmap>* icons); | 576 virtual void GetIcons(std::vector<SkBitmap>* icons) OVERRIDE; |
| 577 | 577 |
| 578 // Returns the index of the icon to use for |node|. Return -1 to use the | 578 // Returns the index of the icon to use for |node|. Return -1 to use the |
| 579 // default icon. The index is relative to the list of icons returned from | 579 // default icon. The index is relative to the list of icons returned from |
| 580 // GetIcons. | 580 // GetIcons. |
| 581 virtual int GetIconIndex(ui::TreeModelNode* node); | 581 virtual int GetIconIndex(ui::TreeModelNode* node) OVERRIDE; |
| 582 | 582 |
| 583 // CookiesTreeModel methods: | 583 // CookiesTreeModel methods: |
| 584 void DeleteAllStoredObjects(); | 584 void DeleteAllStoredObjects(); |
| 585 void DeleteCookieNode(CookieTreeNode* cookie_node); | 585 void DeleteCookieNode(CookieTreeNode* cookie_node); |
| 586 | 586 |
| 587 // Filter the origins to only display matched results. | 587 // Filter the origins to only display matched results. |
| 588 void UpdateSearchResults(const std::wstring& filter); | 588 void UpdateSearchResults(const std::wstring& filter); |
| 589 | 589 |
| 590 // Manages CookiesTreeModel::Observers. This will also call | 590 // Manages CookiesTreeModel::Observers. This will also call |
| 591 // TreeNodeModel::AddObserver so that it gets all the proper notifications. | 591 // TreeNodeModel::AddObserver so that it gets all the proper notifications. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 friend class CookieTreeLocalStorageNode; | 675 friend class CookieTreeLocalStorageNode; |
| 676 friend class CookieTreeSessionStorageNode; | 676 friend class CookieTreeSessionStorageNode; |
| 677 friend class CookieTreeIndexedDBNode; | 677 friend class CookieTreeIndexedDBNode; |
| 678 friend class CookieTreeFileSystemNode; | 678 friend class CookieTreeFileSystemNode; |
| 679 friend class CookieTreeQuotaNode; | 679 friend class CookieTreeQuotaNode; |
| 680 | 680 |
| 681 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel); | 681 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel); |
| 682 }; | 682 }; |
| 683 | 683 |
| 684 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_ | 684 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_ |
| OLD | NEW |