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

Unified Diff: chrome/browser/history/page_usage_data.h

Issue 428253008: Revert of Partially move history_types.{cc,h} to //components/history (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/page_usage_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/page_usage_data.h
diff --git a/chrome/browser/history/page_usage_data.h b/chrome/browser/history/page_usage_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..efc037f8b869e99e0064f91ab40197baf479d49b
--- /dev/null
+++ b/chrome/browser/history/page_usage_data.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
+#define CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
+
+#include "base/strings/string16.h"
+#include "chrome/browser/history/history_types.h"
+#include "url/gurl.h"
+
+class SkBitmap;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// PageUsageData
+//
+// A per domain usage data structure to compute and manage most visited
+// pages.
+//
+// See History::QueryPageUsageSince()
+//
+/////////////////////////////////////////////////////////////////////////////
+class PageUsageData {
+ public:
+ explicit PageUsageData(history::SegmentID id);
+
+ virtual ~PageUsageData();
+
+ // Return the url ID
+ history::SegmentID GetID() const {
+ return id_;
+ }
+
+ void SetURL(const GURL& url) {
+ url_ = url;
+ }
+
+ const GURL& GetURL() const {
+ return url_;
+ }
+
+ void SetTitle(const base::string16& s) {
+ title_ = s;
+ }
+
+ const base::string16& GetTitle() const {
+ return title_;
+ }
+
+ void SetScore(double v) {
+ score_ = v;
+ }
+
+ double GetScore() const {
+ return score_;
+ }
+
+ // Sort predicate to sort instances by score (high to low)
+ static bool Predicate(const PageUsageData* dud1, const PageUsageData* dud2);
+
+ private:
+ history::SegmentID id_;
+ GURL url_;
+ base::string16 title_;
+
+ double score_;
+};
+
+#endif // CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/page_usage_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698