Chromium Code Reviews| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 FaviconBitmapIDSize(); | 519 FaviconBitmapIDSize(); |
| 520 ~FaviconBitmapIDSize(); | 520 ~FaviconBitmapIDSize(); |
| 521 | 521 |
| 522 // The unique id of the favicon bitmap. | 522 // The unique id of the favicon bitmap. |
| 523 FaviconBitmapID bitmap_id = 0; | 523 FaviconBitmapID bitmap_id = 0; |
| 524 | 524 |
| 525 // The pixel dimensions of the associated bitmap. | 525 // The pixel dimensions of the associated bitmap. |
| 526 gfx::Size pixel_size; | 526 gfx::Size pixel_size; |
| 527 }; | 527 }; |
| 528 | 528 |
| 529 enum FaviconBitmapType { | |
| 530 // The bitmap gets downloaded while visiting its page. Their life-time is | |
| 531 // bound to the life-time of the corresponding visit in history. | |
| 532 // - These bitmaps are re-downloaded when visiting the page again and the | |
| 533 // last_updated timestamp is old enough. | |
| 534 ON_VISIT, | |
| 535 | |
| 536 // The bitmap gets downloaded because it is demanded by some Chrome UI (while | |
| 537 // not visiting its page). For this reason, their life-time cannot be bound to | |
| 538 // the life-time of the corresponding visit in history. | |
| 539 // - These bitmaps are evicted from the database based on the last time they | |
| 540 // get requested. | |
|
pkotwicz
2017/06/07 17:40:53
Nit: get -> were
jkrcal
2017/06/09 16:38:37
Done.
| |
| 541 // - Furthermore, on-demand bitmaps are immediately marked as expired. Hence, | |
| 542 // they are always replaced by ON_VISIT favicons whenever their page gets | |
| 543 // visited. | |
| 544 ON_DEMAND | |
| 545 }; | |
| 546 | |
| 529 // Defines a favicon bitmap stored in the history backend. | 547 // Defines a favicon bitmap stored in the history backend. |
| 530 struct FaviconBitmap { | 548 struct FaviconBitmap { |
| 531 FaviconBitmap(); | 549 FaviconBitmap(); |
| 532 FaviconBitmap(const FaviconBitmap& other); | 550 FaviconBitmap(const FaviconBitmap& other); |
| 533 ~FaviconBitmap(); | 551 ~FaviconBitmap(); |
| 534 | 552 |
| 535 // The unique id of the bitmap. | 553 // The unique id of the bitmap. |
| 536 FaviconBitmapID bitmap_id = 0; | 554 FaviconBitmapID bitmap_id = 0; |
| 537 | 555 |
| 538 // The id of the favicon to which the bitmap belongs to. | 556 // The id of the favicon to which the bitmap belongs to. |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 561 void SetTimeRangeForOneDay(base::Time time); | 579 void SetTimeRangeForOneDay(base::Time time); |
| 562 | 580 |
| 563 std::set<GURL> urls; | 581 std::set<GURL> urls; |
| 564 base::Time begin_time; | 582 base::Time begin_time; |
| 565 base::Time end_time; | 583 base::Time end_time; |
| 566 }; | 584 }; |
| 567 | 585 |
| 568 } // namespace history | 586 } // namespace history |
| 569 | 587 |
| 570 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 588 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
| OLD | NEW |