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

Side by Side Diff: chrome/common/thumbnail_score.h

Issue 7839019: Remove a static initializer in thumbnail_score.o (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/thumbnail_score.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_THUMBNAIL_SCORE_H_
6 #define CHROME_COMMON_THUMBNAIL_SCORE_H_ 6 #define CHROME_COMMON_THUMBNAIL_SCORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // How bad a thumbnail needs to be before we completely ignore it. 83 // How bad a thumbnail needs to be before we completely ignore it.
84 static const double kThumbnailMaximumBoringness; 84 static const double kThumbnailMaximumBoringness;
85 85
86 // We consider a thumbnail interesting enough if the boring score is 86 // We consider a thumbnail interesting enough if the boring score is
87 // lower than this. 87 // lower than this.
88 static const double kThumbnailInterestingEnoughBoringness; 88 static const double kThumbnailInterestingEnoughBoringness;
89 89
90 // Time before we take a worse thumbnail (subject to 90 // Time before we take a worse thumbnail (subject to
91 // kThumbnailMaximumBoringness) over what's currently in the database 91 // kThumbnailMaximumBoringness) over what's currently in the database
92 // for freshness. 92 // for freshness.
93 static const base::TimeDelta kUpdateThumbnailTime; 93 static const int64 kUpdateThumbnailTimeDays;
94 94
95 // Penalty of how much more boring a thumbnail should be per hour. 95 // Penalty of how much more boring a thumbnail should be per hour.
96 static const double kThumbnailDegradePerHour; 96 static const double kThumbnailDegradePerHour;
97 97
98 // Checks whether we should consider updating a new thumbnail based on 98 // Checks whether we should consider updating a new thumbnail based on
99 // this score. For instance, we don't have to update a new thumbnail 99 // this score. For instance, we don't have to update a new thumbnail
100 // if the current thumbnail is new and interesting enough. 100 // if the current thumbnail is new and interesting enough.
101 bool ShouldConsiderUpdating(); 101 bool ShouldConsiderUpdating();
102 }; 102 };
103 103
104 // Checks whether we should replace one thumbnail with another. 104 // Checks whether we should replace one thumbnail with another.
105 bool ShouldReplaceThumbnailWith(const ThumbnailScore& current, 105 bool ShouldReplaceThumbnailWith(const ThumbnailScore& current,
106 const ThumbnailScore& replacement); 106 const ThumbnailScore& replacement);
107 107
108 #endif // CHROME_COMMON_THUMBNAIL_SCORE_H_ 108 #endif // CHROME_COMMON_THUMBNAIL_SCORE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/thumbnail_score.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698