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

Unified Diff: chrome/browser/history/history_types.cc

Issue 10948045: introduce chrome/browser/common directory and move url_database(and its dependencies) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | chrome/browser/history/in_memory_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_types.cc
===================================================================
--- chrome/browser/history/history_types.cc (revision 157579)
+++ chrome/browser/history/history_types.cc (working copy)
@@ -12,56 +12,6 @@
namespace history {
-// URLRow ----------------------------------------------------------------------
-
-URLRow::URLRow() {
- Initialize();
-}
-
-URLRow::URLRow(const GURL& url) : url_(url) {
- // Initialize will not set the URL, so our initialization above will stay.
- Initialize();
-}
-
-URLRow::URLRow(const GURL& url, URLID id) : url_(url) {
- // Initialize will not set the URL, so our initialization above will stay.
- Initialize();
- // Initialize will zero the id_, so set it here.
- id_ = id;
-}
-
-URLRow::~URLRow() {
-}
-
-URLRow& URLRow::operator=(const URLRow& other) {
- id_ = other.id_;
- url_ = other.url_;
- title_ = other.title_;
- visit_count_ = other.visit_count_;
- typed_count_ = other.typed_count_;
- last_visit_ = other.last_visit_;
- hidden_ = other.hidden_;
- return *this;
-}
-
-void URLRow::Swap(URLRow* other) {
- std::swap(id_, other->id_);
- url_.Swap(&other->url_);
- title_.swap(other->title_);
- std::swap(visit_count_, other->visit_count_);
- std::swap(typed_count_, other->typed_count_);
- std::swap(last_visit_, other->last_visit_);
- std::swap(hidden_, other->hidden_);
-}
-
-void URLRow::Initialize() {
- id_ = 0;
- visit_count_ = 0;
- typed_count_ = 0;
- last_visit_ = base::Time();
- hidden_ = false;
-}
-
// VisitRow --------------------------------------------------------------------
VisitRow::VisitRow()
@@ -269,18 +219,6 @@
begin_time = end_time - base::TimeDelta::FromDays(days_ago);
}
-// KeywordSearchTermVisit -----------------------------------------------------
-
-KeywordSearchTermVisit::KeywordSearchTermVisit() : visits(0) {}
-
-KeywordSearchTermVisit::~KeywordSearchTermVisit() {}
-
-// KeywordSearchTermRow --------------------------------------------------------
-
-KeywordSearchTermRow::KeywordSearchTermRow() : keyword_id(0), url_id(0) {}
-
-KeywordSearchTermRow::~KeywordSearchTermRow() {}
-
// MostVisitedURL --------------------------------------------------------------
MostVisitedURL::MostVisitedURL() {}
@@ -364,36 +302,6 @@
MostVisitedThumbnails::~MostVisitedThumbnails() {}
-// Autocomplete thresholds -----------------------------------------------------
-
-const int kLowQualityMatchTypedLimit = 1;
-const int kLowQualityMatchVisitLimit = 4;
-const int kLowQualityMatchAgeLimitInDays = 3;
-
-base::Time AutocompleteAgeThreshold() {
- return (base::Time::Now() -
- base::TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays));
-}
-
-bool RowQualifiesAsSignificant(const URLRow& row,
- const base::Time& threshold) {
- const base::Time& real_threshold =
- threshold.is_null() ? AutocompleteAgeThreshold() : threshold;
- return (row.typed_count() >= kLowQualityMatchTypedLimit) ||
- (row.visit_count() >= kLowQualityMatchVisitLimit) ||
- (row.last_visit() >= real_threshold);
-}
-
-// IconMapping ----------------------------------------------------------------
-
-IconMapping::IconMapping()
- : mapping_id(0),
- icon_id(0),
- icon_type(INVALID_ICON) {
-}
-
-IconMapping::~IconMapping() {}
-
// FaviconBitmapResult --------------------------------------------------------
FaviconBitmapResult::FaviconBitmapResult()
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | chrome/browser/history/in_memory_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698