OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMMON_THUMBNAIL_SCORE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_COMMON_THUMBNAIL_SCORE_H_ |
6 #define CHROME_COMMON_THUMBNAIL_SCORE_H_ | 6 #define COMPONENTS_HISTORY_CORE_COMMON_THUMBNAIL_SCORE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 | 10 |
11 // A set of metadata about a Thumbnail. | 11 // A set of metadata about a Thumbnail. |
12 struct ThumbnailScore { | 12 struct ThumbnailScore { |
13 // Initializes the ThumbnailScore to the absolute worst possible values | 13 // Initializes the ThumbnailScore to the absolute worst possible values |
14 // except for time, which is set to Now(), and redirect_hops_from_dest which | 14 // except for time, which is set to Now(), and redirect_hops_from_dest which |
15 // is set to 0. | 15 // is set to 0. |
16 ThumbnailScore(); | 16 ThumbnailScore(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // Checks whether we should consider updating a new thumbnail based on | 102 // Checks whether we should consider updating a new thumbnail based on |
103 // this score. For instance, we don't have to update a new thumbnail | 103 // this score. For instance, we don't have to update a new thumbnail |
104 // if the current thumbnail is new and interesting enough. | 104 // if the current thumbnail is new and interesting enough. |
105 bool ShouldConsiderUpdating(); | 105 bool ShouldConsiderUpdating(); |
106 }; | 106 }; |
107 | 107 |
108 // Checks whether we should replace one thumbnail with another. | 108 // Checks whether we should replace one thumbnail with another. |
109 bool ShouldReplaceThumbnailWith(const ThumbnailScore& current, | 109 bool ShouldReplaceThumbnailWith(const ThumbnailScore& current, |
110 const ThumbnailScore& replacement); | 110 const ThumbnailScore& replacement); |
111 | 111 |
112 #endif // CHROME_COMMON_THUMBNAIL_SCORE_H_ | 112 #endif // COMPONENTS_HISTORY_CORE_COMMON_THUMBNAIL_SCORE_H_ |
OLD | NEW |