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

Side by Side Diff: components/history/core/browser/history_types.h

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Peter's comments Created 3 years, 6 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
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698