| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(CookieTreeNode); | 158 DISALLOW_COPY_AND_ASSIGN(CookieTreeNode); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 // CookieTreeRootNode --------------------------------------------------------- | 161 // CookieTreeRootNode --------------------------------------------------------- |
| 162 // The node at the root of the CookieTree that gets inserted into the view. | 162 // The node at the root of the CookieTree that gets inserted into the view. |
| 163 class CookieTreeRootNode : public CookieTreeNode { | 163 class CookieTreeRootNode : public CookieTreeNode { |
| 164 public: | 164 public: |
| 165 explicit CookieTreeRootNode(CookiesTreeModel* model) : model_(model) {} | 165 explicit CookieTreeRootNode(CookiesTreeModel* model); |
| 166 virtual ~CookieTreeRootNode() {} | 166 virtual ~CookieTreeRootNode(); |
| 167 | 167 |
| 168 CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url); | 168 CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url); |
| 169 | 169 |
| 170 // CookieTreeNode methods: | 170 // CookieTreeNode methods: |
| 171 virtual CookiesTreeModel* GetModel() const { return model_; } | 171 virtual CookiesTreeModel* GetModel() const; |
| 172 virtual DetailedInfo GetDetailedInfo() const { | 172 virtual DetailedInfo GetDetailedInfo() const; |
| 173 return DetailedInfo(string16(), | 173 |
| 174 DetailedInfo::TYPE_ROOT, | |
| 175 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 176 } | |
| 177 private: | 174 private: |
| 178 | |
| 179 CookiesTreeModel* model_; | 175 CookiesTreeModel* model_; |
| 180 | 176 |
| 181 DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode); | 177 DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode); |
| 182 }; | 178 }; |
| 183 | 179 |
| 184 // CookieTreeOriginNode ------------------------------------------------------- | 180 // CookieTreeOriginNode ------------------------------------------------------- |
| 185 class CookieTreeOriginNode : public CookieTreeNode { | 181 class CookieTreeOriginNode : public CookieTreeNode { |
| 186 public: | 182 public: |
| 187 // Returns the origin node's title to use for a given URL. | 183 // Returns the origin node's title to use for a given URL. |
| 188 static std::wstring TitleForUrl(const GURL& url); | 184 static std::wstring TitleForUrl(const GURL& url); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 }; | 225 }; |
| 230 | 226 |
| 231 // CookieTreeCookieNode ------------------------------------------------------ | 227 // CookieTreeCookieNode ------------------------------------------------------ |
| 232 class CookieTreeCookieNode : public CookieTreeNode { | 228 class CookieTreeCookieNode : public CookieTreeNode { |
| 233 public: | 229 public: |
| 234 friend class CookieTreeCookiesNode; | 230 friend class CookieTreeCookiesNode; |
| 235 | 231 |
| 236 // Does not take ownership of cookie, and cookie should remain valid at least | 232 // Does not take ownership of cookie, and cookie should remain valid at least |
| 237 // as long as the CookieTreeCookieNode is valid. | 233 // as long as the CookieTreeCookieNode is valid. |
| 238 explicit CookieTreeCookieNode(net::CookieMonster::CanonicalCookie* cookie); | 234 explicit CookieTreeCookieNode(net::CookieMonster::CanonicalCookie* cookie); |
| 239 virtual ~CookieTreeCookieNode() {} | 235 virtual ~CookieTreeCookieNode(); |
| 240 | 236 |
| 241 // CookieTreeNode methods: | 237 // CookieTreeNode methods: |
| 242 virtual void DeleteStoredObjects(); | 238 virtual void DeleteStoredObjects(); |
| 243 virtual DetailedInfo GetDetailedInfo() const { | 239 virtual DetailedInfo GetDetailedInfo() const; |
| 244 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 245 DetailedInfo::TYPE_COOKIE, | |
| 246 cookie_, NULL, NULL, NULL, NULL, NULL); | |
| 247 } | |
| 248 | 240 |
| 249 private: | 241 private: |
| 250 // Cookie_ is not owned by the node, and is expected to remain valid as long | 242 // Cookie_ is not owned by the node, and is expected to remain valid as long |
| 251 // as the CookieTreeCookieNode is valid. | 243 // as the CookieTreeCookieNode is valid. |
| 252 net::CookieMonster::CanonicalCookie* cookie_; | 244 net::CookieMonster::CanonicalCookie* cookie_; |
| 253 | 245 |
| 254 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookieNode); | 246 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookieNode); |
| 255 }; | 247 }; |
| 256 | 248 |
| 257 class CookieTreeCookiesNode : public CookieTreeNode { | 249 class CookieTreeCookiesNode : public CookieTreeNode { |
| 258 public: | 250 public: |
| 259 CookieTreeCookiesNode(); | 251 CookieTreeCookiesNode(); |
| 260 virtual ~CookieTreeCookiesNode() {} | 252 virtual ~CookieTreeCookiesNode(); |
| 261 | 253 |
| 262 virtual DetailedInfo GetDetailedInfo() const { | 254 virtual DetailedInfo GetDetailedInfo() const; |
| 263 return DetailedInfo(GetParent()->GetTitle(), | |
| 264 DetailedInfo::TYPE_COOKIES, | |
| 265 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 266 } | |
| 267 | 255 |
| 268 void AddCookieNode(CookieTreeCookieNode* child) { | 256 void AddCookieNode(CookieTreeCookieNode* child) { |
| 269 AddChildSortedByTitle(child); | 257 AddChildSortedByTitle(child); |
| 270 } | 258 } |
| 271 | 259 |
| 272 private: | 260 private: |
| 273 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookiesNode); | 261 DISALLOW_COPY_AND_ASSIGN(CookieTreeCookiesNode); |
| 274 }; | 262 }; |
| 275 | 263 |
| 276 // CookieTreeAppCacheNode ----------------------------------------------------- | 264 // CookieTreeAppCacheNode ----------------------------------------------------- |
| 277 class CookieTreeAppCacheNode : public CookieTreeNode { | 265 class CookieTreeAppCacheNode : public CookieTreeNode { |
| 278 public: | 266 public: |
| 279 friend class CookieTreeAppCachesNode; | 267 friend class CookieTreeAppCachesNode; |
| 280 | 268 |
| 281 // Does not take ownership of appcache_info, and appcache_info should remain | 269 // Does not take ownership of appcache_info, and appcache_info should remain |
| 282 // valid at least as long as the CookieTreeAppCacheNode is valid. | 270 // valid at least as long as the CookieTreeAppCacheNode is valid. |
| 283 explicit CookieTreeAppCacheNode( | 271 explicit CookieTreeAppCacheNode( |
| 284 const appcache::AppCacheInfo* appcache_info); | 272 const appcache::AppCacheInfo* appcache_info); |
| 285 virtual ~CookieTreeAppCacheNode() {} | 273 virtual ~CookieTreeAppCacheNode() {} |
| 286 | 274 |
| 287 virtual void DeleteStoredObjects(); | 275 virtual void DeleteStoredObjects(); |
| 288 virtual DetailedInfo GetDetailedInfo() const { | 276 virtual DetailedInfo GetDetailedInfo() const; |
| 289 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 290 DetailedInfo::TYPE_APPCACHE, | |
| 291 NULL, NULL, NULL, NULL, appcache_info_, NULL); | |
| 292 } | |
| 293 | 277 |
| 294 private: | 278 private: |
| 295 const appcache::AppCacheInfo* appcache_info_; | 279 const appcache::AppCacheInfo* appcache_info_; |
| 296 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCacheNode); | 280 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCacheNode); |
| 297 }; | 281 }; |
| 298 | 282 |
| 299 class CookieTreeAppCachesNode : public CookieTreeNode { | 283 class CookieTreeAppCachesNode : public CookieTreeNode { |
| 300 public: | 284 public: |
| 301 CookieTreeAppCachesNode(); | 285 CookieTreeAppCachesNode(); |
| 302 virtual ~CookieTreeAppCachesNode() {} | 286 virtual ~CookieTreeAppCachesNode(); |
| 303 | 287 |
| 304 virtual DetailedInfo GetDetailedInfo() const { | 288 virtual DetailedInfo GetDetailedInfo() const; |
| 305 return DetailedInfo(GetParent()->GetTitle(), | |
| 306 DetailedInfo::TYPE_APPCACHES, | |
| 307 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 308 } | |
| 309 | 289 |
| 310 void AddAppCacheNode(CookieTreeAppCacheNode* child) { | 290 void AddAppCacheNode(CookieTreeAppCacheNode* child) { |
| 311 AddChildSortedByTitle(child); | 291 AddChildSortedByTitle(child); |
| 312 } | 292 } |
| 313 | 293 |
| 314 private: | 294 private: |
| 315 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCachesNode); | 295 DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCachesNode); |
| 316 }; | 296 }; |
| 317 | 297 |
| 318 // CookieTreeDatabaseNode ----------------------------------------------------- | 298 // CookieTreeDatabaseNode ----------------------------------------------------- |
| 319 class CookieTreeDatabaseNode : public CookieTreeNode { | 299 class CookieTreeDatabaseNode : public CookieTreeNode { |
| 320 public: | 300 public: |
| 321 friend class CookieTreeDatabasesNode; | 301 friend class CookieTreeDatabasesNode; |
| 322 | 302 |
| 323 // Does not take ownership of database_info, and database_info should remain | 303 // Does not take ownership of database_info, and database_info should remain |
| 324 // valid at least as long as the CookieTreeDatabaseNode is valid. | 304 // valid at least as long as the CookieTreeDatabaseNode is valid. |
| 325 explicit CookieTreeDatabaseNode( | 305 explicit CookieTreeDatabaseNode( |
| 326 BrowsingDataDatabaseHelper::DatabaseInfo* database_info); | 306 BrowsingDataDatabaseHelper::DatabaseInfo* database_info); |
| 327 virtual ~CookieTreeDatabaseNode() {} | 307 virtual ~CookieTreeDatabaseNode(); |
| 328 | 308 |
| 329 virtual void DeleteStoredObjects(); | 309 virtual void DeleteStoredObjects(); |
| 330 virtual DetailedInfo GetDetailedInfo() const { | 310 virtual DetailedInfo GetDetailedInfo() const; |
| 331 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 332 DetailedInfo::TYPE_DATABASE, | |
| 333 NULL, database_info_, NULL, NULL, NULL, NULL); | |
| 334 } | |
| 335 | 311 |
| 336 private: | 312 private: |
| 337 // database_info_ is not owned by the node, and is expected to remain | 313 // database_info_ is not owned by the node, and is expected to remain |
| 338 // valid as long as the CookieTreeDatabaseNode is valid. | 314 // valid as long as the CookieTreeDatabaseNode is valid. |
| 339 BrowsingDataDatabaseHelper::DatabaseInfo* database_info_; | 315 BrowsingDataDatabaseHelper::DatabaseInfo* database_info_; |
| 340 | 316 |
| 341 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabaseNode); | 317 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabaseNode); |
| 342 }; | 318 }; |
| 343 | 319 |
| 344 class CookieTreeDatabasesNode : public CookieTreeNode { | 320 class CookieTreeDatabasesNode : public CookieTreeNode { |
| 345 public: | 321 public: |
| 346 CookieTreeDatabasesNode(); | 322 CookieTreeDatabasesNode(); |
| 347 virtual ~CookieTreeDatabasesNode() {} | 323 virtual ~CookieTreeDatabasesNode(); |
| 348 | 324 |
| 349 virtual DetailedInfo GetDetailedInfo() const { | 325 virtual DetailedInfo GetDetailedInfo() const; |
| 350 return DetailedInfo(GetParent()->GetTitle(), | |
| 351 DetailedInfo::TYPE_DATABASES, | |
| 352 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 353 } | |
| 354 | 326 |
| 355 void AddDatabaseNode(CookieTreeDatabaseNode* child) { | 327 void AddDatabaseNode(CookieTreeDatabaseNode* child) { |
| 356 AddChildSortedByTitle(child); | 328 AddChildSortedByTitle(child); |
| 357 } | 329 } |
| 358 | 330 |
| 359 private: | 331 private: |
| 360 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode); | 332 DISALLOW_COPY_AND_ASSIGN(CookieTreeDatabasesNode); |
| 361 }; | 333 }; |
| 362 | 334 |
| 363 | 335 |
| 364 // CookieTreeLocalStorageNode ------------------------------------------------- | 336 // CookieTreeLocalStorageNode ------------------------------------------------- |
| 365 class CookieTreeLocalStorageNode : public CookieTreeNode { | 337 class CookieTreeLocalStorageNode : public CookieTreeNode { |
| 366 public: | 338 public: |
| 367 // Does not take ownership of local_storage_info, and local_storage_info | 339 // Does not take ownership of local_storage_info, and local_storage_info |
| 368 // should remain valid at least as long as the CookieTreeLocalStorageNode is | 340 // should remain valid at least as long as the CookieTreeLocalStorageNode is |
| 369 // valid. | 341 // valid. |
| 370 explicit CookieTreeLocalStorageNode( | 342 explicit CookieTreeLocalStorageNode( |
| 371 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info); | 343 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info); |
| 372 virtual ~CookieTreeLocalStorageNode() {} | 344 virtual ~CookieTreeLocalStorageNode(); |
| 373 | 345 |
| 374 // CookieTreeNode methods: | 346 // CookieTreeNode methods: |
| 375 virtual void DeleteStoredObjects(); | 347 virtual void DeleteStoredObjects(); |
| 376 virtual DetailedInfo GetDetailedInfo() const { | 348 virtual DetailedInfo GetDetailedInfo() const; |
| 377 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 378 DetailedInfo::TYPE_LOCAL_STORAGE, | |
| 379 NULL, NULL, local_storage_info_, NULL, NULL, NULL); | |
| 380 } | |
| 381 | 349 |
| 382 private: | 350 private: |
| 383 // local_storage_info_ is not owned by the node, and is expected to remain | 351 // local_storage_info_ is not owned by the node, and is expected to remain |
| 384 // valid as long as the CookieTreeLocalStorageNode is valid. | 352 // valid as long as the CookieTreeLocalStorageNode is valid. |
| 385 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info_; | 353 BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info_; |
| 386 | 354 |
| 387 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStorageNode); | 355 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStorageNode); |
| 388 }; | 356 }; |
| 389 | 357 |
| 390 class CookieTreeLocalStoragesNode : public CookieTreeNode { | 358 class CookieTreeLocalStoragesNode : public CookieTreeNode { |
| 391 public: | 359 public: |
| 392 CookieTreeLocalStoragesNode(); | 360 CookieTreeLocalStoragesNode(); |
| 393 virtual ~CookieTreeLocalStoragesNode() {} | 361 virtual ~CookieTreeLocalStoragesNode(); |
| 394 | 362 |
| 395 virtual DetailedInfo GetDetailedInfo() const { | 363 virtual DetailedInfo GetDetailedInfo() const; |
| 396 return DetailedInfo(GetParent()->GetTitle(), | |
| 397 DetailedInfo::TYPE_LOCAL_STORAGES, | |
| 398 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 399 } | |
| 400 | 364 |
| 401 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) { | 365 void AddLocalStorageNode(CookieTreeLocalStorageNode* child) { |
| 402 AddChildSortedByTitle(child); | 366 AddChildSortedByTitle(child); |
| 403 } | 367 } |
| 404 | 368 |
| 405 private: | 369 private: |
| 406 | 370 |
| 407 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode); | 371 DISALLOW_COPY_AND_ASSIGN(CookieTreeLocalStoragesNode); |
| 408 }; | 372 }; |
| 409 | 373 |
| 410 | 374 |
| 411 // CookieTreeSessionStorageNode ----------------------------------------------- | 375 // CookieTreeSessionStorageNode ----------------------------------------------- |
| 412 class CookieTreeSessionStorageNode : public CookieTreeNode { | 376 class CookieTreeSessionStorageNode : public CookieTreeNode { |
| 413 public: | 377 public: |
| 414 // Does not take ownership of session_storage_info, and session_storage_info | 378 // Does not take ownership of session_storage_info, and session_storage_info |
| 415 // should remain valid at least as long as the CookieTreeSessionStorageNode | 379 // should remain valid at least as long as the CookieTreeSessionStorageNode |
| 416 // is valid. | 380 // is valid. |
| 417 explicit CookieTreeSessionStorageNode( | 381 explicit CookieTreeSessionStorageNode( |
| 418 BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info); | 382 BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info); |
| 419 virtual ~CookieTreeSessionStorageNode() {} | 383 virtual ~CookieTreeSessionStorageNode(); |
| 420 | 384 |
| 421 // CookieTreeNode methods: | 385 // CookieTreeNode methods: |
| 422 virtual DetailedInfo GetDetailedInfo() const { | 386 virtual DetailedInfo GetDetailedInfo() const; |
| 423 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 424 DetailedInfo::TYPE_SESSION_STORAGE, | |
| 425 NULL, NULL, NULL, session_storage_info_, NULL, NULL); | |
| 426 } | |
| 427 | 387 |
| 428 private: | 388 private: |
| 429 // session_storage_info_ is not owned by the node, and is expected to remain | 389 // session_storage_info_ is not owned by the node, and is expected to remain |
| 430 // valid as long as the CookieTreeSessionStorageNode is valid. | 390 // valid as long as the CookieTreeSessionStorageNode is valid. |
| 431 BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info_; | 391 BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info_; |
| 432 | 392 |
| 433 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStorageNode); | 393 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStorageNode); |
| 434 }; | 394 }; |
| 435 | 395 |
| 436 class CookieTreeSessionStoragesNode : public CookieTreeNode { | 396 class CookieTreeSessionStoragesNode : public CookieTreeNode { |
| 437 public: | 397 public: |
| 438 CookieTreeSessionStoragesNode(); | 398 CookieTreeSessionStoragesNode(); |
| 439 virtual ~CookieTreeSessionStoragesNode() {} | 399 virtual ~CookieTreeSessionStoragesNode(); |
| 440 | 400 |
| 441 virtual DetailedInfo GetDetailedInfo() const { | 401 virtual DetailedInfo GetDetailedInfo() const; |
| 442 return DetailedInfo(GetParent()->GetTitle(), | |
| 443 DetailedInfo::TYPE_SESSION_STORAGES, | |
| 444 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 445 } | |
| 446 | 402 |
| 447 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) { | 403 void AddSessionStorageNode(CookieTreeSessionStorageNode* child) { |
| 448 AddChildSortedByTitle(child); | 404 AddChildSortedByTitle(child); |
| 449 } | 405 } |
| 450 | 406 |
| 451 private: | 407 private: |
| 452 | 408 |
| 453 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode); | 409 DISALLOW_COPY_AND_ASSIGN(CookieTreeSessionStoragesNode); |
| 454 }; | 410 }; |
| 455 | 411 |
| 456 // CookieTreeIndexedDBNode ----------------------------------------------- | 412 // CookieTreeIndexedDBNode ----------------------------------------------- |
| 457 class CookieTreeIndexedDBNode : public CookieTreeNode { | 413 class CookieTreeIndexedDBNode : public CookieTreeNode { |
| 458 public: | 414 public: |
| 459 // Does not take ownership of session_storage_info, and session_storage_info | 415 // Does not take ownership of session_storage_info, and session_storage_info |
| 460 // should remain valid at least as long as the CookieTreeSessionStorageNode | 416 // should remain valid at least as long as the CookieTreeSessionStorageNode |
| 461 // is valid. | 417 // is valid. |
| 462 explicit CookieTreeIndexedDBNode( | 418 explicit CookieTreeIndexedDBNode( |
| 463 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info); | 419 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info); |
| 464 virtual ~CookieTreeIndexedDBNode() {} | 420 virtual ~CookieTreeIndexedDBNode(); |
| 465 | 421 |
| 466 // CookieTreeNode methods: | 422 // CookieTreeNode methods: |
| 467 virtual void DeleteStoredObjects(); | 423 virtual void DeleteStoredObjects(); |
| 468 virtual DetailedInfo GetDetailedInfo() const { | 424 virtual DetailedInfo GetDetailedInfo() const; |
| 469 return DetailedInfo(GetParent()->GetParent()->GetTitle(), | |
| 470 DetailedInfo::TYPE_INDEXED_DB, | |
| 471 NULL, NULL, NULL, NULL, NULL, indexed_db_info_); | |
| 472 } | |
| 473 | 425 |
| 474 private: | 426 private: |
| 475 // indexed_db_info_ is not owned by the node, and is expected to remain | 427 // indexed_db_info_ is not owned by the node, and is expected to remain |
| 476 // valid as long as the CookieTreeIndexedDBNode is valid. | 428 // valid as long as the CookieTreeIndexedDBNode is valid. |
| 477 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info_; | 429 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info_; |
| 478 | 430 |
| 479 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBNode); | 431 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBNode); |
| 480 }; | 432 }; |
| 481 | 433 |
| 482 class CookieTreeIndexedDBsNode : public CookieTreeNode { | 434 class CookieTreeIndexedDBsNode : public CookieTreeNode { |
| 483 public: | 435 public: |
| 484 CookieTreeIndexedDBsNode(); | 436 CookieTreeIndexedDBsNode(); |
| 485 virtual ~CookieTreeIndexedDBsNode() {} | 437 virtual ~CookieTreeIndexedDBsNode(); |
| 486 | 438 |
| 487 virtual DetailedInfo GetDetailedInfo() const { | 439 virtual DetailedInfo GetDetailedInfo() const; |
| 488 return DetailedInfo(GetParent()->GetTitle(), | |
| 489 DetailedInfo::TYPE_INDEXED_DBS, | |
| 490 NULL, NULL, NULL, NULL, NULL, NULL); | |
| 491 } | |
| 492 | 440 |
| 493 void AddIndexedDBNode(CookieTreeIndexedDBNode* child) { | 441 void AddIndexedDBNode(CookieTreeIndexedDBNode* child) { |
| 494 AddChildSortedByTitle(child); | 442 AddChildSortedByTitle(child); |
| 495 } | 443 } |
| 496 | 444 |
| 497 private: | 445 private: |
| 498 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBsNode); | 446 DISALLOW_COPY_AND_ASSIGN(CookieTreeIndexedDBsNode); |
| 499 }; | 447 }; |
| 500 | 448 |
| 501 | 449 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 friend class CookieTreeAppCacheNode; | 561 friend class CookieTreeAppCacheNode; |
| 614 friend class CookieTreeCookieNode; | 562 friend class CookieTreeCookieNode; |
| 615 friend class CookieTreeDatabaseNode; | 563 friend class CookieTreeDatabaseNode; |
| 616 friend class CookieTreeLocalStorageNode; | 564 friend class CookieTreeLocalStorageNode; |
| 617 friend class CookieTreeIndexedDBNode; | 565 friend class CookieTreeIndexedDBNode; |
| 618 | 566 |
| 619 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel); | 567 DISALLOW_COPY_AND_ASSIGN(CookiesTreeModel); |
| 620 }; | 568 }; |
| 621 | 569 |
| 622 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_ | 570 #endif // CHROME_BROWSER_COOKIES_TREE_MODEL_H_ |
| OLD | NEW |