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

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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « components/history/core/browser/history_service.cc ('k') | components/history/core/browser/thumbnail_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698