OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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" |
12 | 12 |
13 class SkBitmap; | 13 class SkBitmap; |
14 | 14 |
15 ///////////////////////////////////////////////////////////////////////////// | 15 ///////////////////////////////////////////////////////////////////////////// |
16 // | 16 // |
17 // PageUsageData | 17 // PageUsageData |
18 // | 18 // |
19 // A per domain usage data structure to compute and manage most visited | 19 // A per domain usage data structure to compute and manage most visited |
20 // pages. | 20 // pages. |
21 // | 21 // |
22 // See History::QueryPageUsageSince() | 22 // See History::QueryPageUsageSince() |
23 // | 23 // |
24 ///////////////////////////////////////////////////////////////////////////// | 24 ///////////////////////////////////////////////////////////////////////////// |
25 class PageUsageData { | 25 class PageUsageData { |
26 public: | 26 public: |
27 explicit PageUsageData(history::URLID id) | 27 explicit PageUsageData(history::URLID id); |
28 : id_(id), | |
29 thumbnail_(NULL), | |
30 thumbnail_set_(false), | |
31 thumbnail_pending_(false), | |
32 favicon_(NULL), | |
33 favicon_set_(false), | |
34 favicon_pending_(false), | |
35 score_(0.0) { | |
36 } | |
37 | 28 |
38 virtual ~PageUsageData(); | 29 virtual ~PageUsageData(); |
39 | 30 |
40 // Return the url ID | 31 // Return the url ID |
41 history::URLID GetID() const { | 32 history::URLID GetID() const { |
42 return id_; | 33 return id_; |
43 } | 34 } |
44 | 35 |
45 void SetURL(const GURL& url) { | 36 void SetURL(const GURL& url) { |
46 url_ = url; | 37 url_ = url; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 117 |
127 SkBitmap* favicon_; | 118 SkBitmap* favicon_; |
128 bool favicon_set_; | 119 bool favicon_set_; |
129 // Whether we have an outstanding request for the favicon. | 120 // Whether we have an outstanding request for the favicon. |
130 bool favicon_pending_; | 121 bool favicon_pending_; |
131 | 122 |
132 double score_; | 123 double score_; |
133 }; | 124 }; |
134 | 125 |
135 #endif // CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__ | 126 #endif // CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__ |
OLD | NEW |