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

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

Issue 111633003: Removes some dead database code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leave idle comment Created 7 years 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
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 211a83a350d79e41eb0052008bb97f5a842c91c1..c78b575371e15c9cd030ccda5a84b7a422caee51 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1085,47 +1085,6 @@ void HistoryBackend::QuerySegmentUsage(
request->ForwardResult(request->handle(), &request->value.get());
}
-void HistoryBackend::IncreaseSegmentDuration(const GURL& url,
- base::Time time,
- base::TimeDelta delta) {
- if (!db_)
- return;
-
- const std::string segment_name(VisitSegmentDatabase::ComputeSegmentName(url));
- SegmentID segment_id = db_->GetSegmentNamed(segment_name);
- if (!segment_id) {
- URLID url_id = db_->GetRowForURL(url, NULL);
- if (!url_id)
- return;
- segment_id = db_->CreateSegment(url_id, segment_name);
- if (!segment_id)
- return;
- }
- SegmentDurationID duration_id;
- base::TimeDelta total_delta;
- if (!db_->GetSegmentDuration(segment_id, time, &duration_id,
- &total_delta)) {
- db_->CreateSegmentDuration(segment_id, time, delta);
- return;
- }
- total_delta += delta;
- db_->SetSegmentDuration(duration_id, total_delta);
-}
-
-void HistoryBackend::QuerySegmentDuration(
- scoped_refptr<QuerySegmentUsageRequest> request,
- const base::Time from_time,
- int max_result_count) {
- if (request->canceled())
- return;
-
- if (db_) {
- db_->QuerySegmentDuration(from_time, max_result_count,
- &request->value.get());
- }
- request->ForwardResult(request->handle(), &request->value.get());
-}
-
// Keyword visits --------------------------------------------------------------
void HistoryBackend::SetKeywordSearchTermsForURL(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698