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

Side by Side Diff: chrome/browser/history/page_usage_data.h

Issue 10673005: Removes unused thumbnail and favicon fields from PageUsageData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « no previous file | chrome/browser/history/page_usage_data.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) 2006-2008 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_BROWSER_HISTORY_PAGE_USAGE_DATA_H__ 5 #ifndef CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
6 #define CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__ 6 #define CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/history/history_types.h" 10 #include "chrome/browser/history/history_types.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void SetScore(double v) { 52 void SetScore(double v) {
53 score_ = v; 53 score_ = v;
54 } 54 }
55 55
56 double GetScore() const { 56 double GetScore() const {
57 return score_; 57 return score_;
58 } 58 }
59 59
60 void SetThumbnailMissing() {
61 thumbnail_set_ = true;
62 }
63
64 void SetThumbnail(SkBitmap* img);
65
66 bool HasThumbnail() const {
67 return thumbnail_set_;
68 }
69
70 const SkBitmap* GetThumbnail() const {
71 return thumbnail_;
72 }
73
74 bool thumbnail_pending() const {
75 return thumbnail_pending_;
76 }
77
78 void set_thumbnail_pending(bool pending) {
79 thumbnail_pending_ = pending;
80 }
81
82 void SetFaviconMissing() {
83 favicon_set_ = true;
84 }
85
86 void SetFavicon(SkBitmap* img);
87
88 bool HasFavicon() const {
89 return favicon_set_;
90 }
91
92 bool favicon_pending() const {
93 return favicon_pending_;
94 }
95
96 void set_favicon_pending(bool pending) {
97 favicon_pending_ = pending;
98 }
99
100 const SkBitmap* GetFavicon() const {
101 return favicon_;
102 }
103
104 // Sort predicate to sort instances by score (high to low) 60 // Sort predicate to sort instances by score (high to low)
105 static bool Predicate(const PageUsageData* dud1, 61 static bool Predicate(const PageUsageData* dud1,
106 const PageUsageData* dud2); 62 const PageUsageData* dud2);
107 63
108 private: 64 private:
109 history::URLID id_; 65 history::URLID id_;
110 GURL url_; 66 GURL url_;
111 string16 title_; 67 string16 title_;
112 68
113 SkBitmap* thumbnail_;
114 bool thumbnail_set_;
115 // Whether we have an outstanding request for the thumbnail.
116 bool thumbnail_pending_;
117
118 SkBitmap* favicon_;
119 bool favicon_set_;
120 // Whether we have an outstanding request for the favicon.
121 bool favicon_pending_;
122
123 double score_; 69 double score_;
124 }; 70 };
125 71
126 #endif // CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__ 72 #endif // CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/page_usage_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698