OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 FaviconBitmapIDSize(); | 499 FaviconBitmapIDSize(); |
500 ~FaviconBitmapIDSize(); | 500 ~FaviconBitmapIDSize(); |
501 | 501 |
502 // The unique id of the favicon bitmap. | 502 // The unique id of the favicon bitmap. |
503 FaviconBitmapID bitmap_id = 0; | 503 FaviconBitmapID bitmap_id = 0; |
504 | 504 |
505 // The pixel dimensions of the associated bitmap. | 505 // The pixel dimensions of the associated bitmap. |
506 gfx::Size pixel_size; | 506 gfx::Size pixel_size; |
507 }; | 507 }; |
508 | 508 |
| 509 enum FaviconBitmapType { |
| 510 // The bitmap gets downloaded while visiting its page. Their life-time is |
| 511 // bound to the life-time of the corresponding visit in history. |
| 512 // - These bitmaps are re-downloaded when visiting the page again and the |
| 513 // last_updated timestamp is old enough. |
| 514 ON_VISIT, |
| 515 |
| 516 // The bitmap gets downloaded because it is demanded by some Chrome UI (while |
| 517 // not visiting its page). For this reason, their life-time cannot be bound to |
| 518 // the life-time of the corresponding visit in history. |
| 519 // - These bitmaps are evicted from the database based on the last time they |
| 520 // were requested. |
| 521 // - Furthermore, on-demand bitmaps are immediately marked as expired. Hence, |
| 522 // they are always replaced by ON_VISIT favicons whenever their page gets |
| 523 // visited. |
| 524 ON_DEMAND |
| 525 }; |
| 526 |
509 // Defines a favicon bitmap stored in the history backend. | 527 // Defines a favicon bitmap stored in the history backend. |
510 struct FaviconBitmap { | 528 struct FaviconBitmap { |
511 FaviconBitmap(); | 529 FaviconBitmap(); |
512 FaviconBitmap(const FaviconBitmap& other); | 530 FaviconBitmap(const FaviconBitmap& other); |
513 ~FaviconBitmap(); | 531 ~FaviconBitmap(); |
514 | 532 |
515 // The unique id of the bitmap. | 533 // The unique id of the bitmap. |
516 FaviconBitmapID bitmap_id = 0; | 534 FaviconBitmapID bitmap_id = 0; |
517 | 535 |
518 // The id of the favicon to which the bitmap belongs to. | 536 // The id of the favicon to which the bitmap belongs to. |
(...skipping 22 matching lines...) Expand all Loading... |
541 void SetTimeRangeForOneDay(base::Time time); | 559 void SetTimeRangeForOneDay(base::Time time); |
542 | 560 |
543 std::set<GURL> urls; | 561 std::set<GURL> urls; |
544 base::Time begin_time; | 562 base::Time begin_time; |
545 base::Time end_time; | 563 base::Time end_time; |
546 }; | 564 }; |
547 | 565 |
548 } // namespace history | 566 } // namespace history |
549 | 567 |
550 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 568 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
OLD | NEW |