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

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 6990074: Change GetVisitCountToHost() to GetVisibleVisitCountToHost(), and restrict it to returning "user-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_marshaling.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/history/history_backend.h" 5 #include "chrome/browser/history/history_backend.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 void HistoryBackend::QueryRedirectsTo( 1305 void HistoryBackend::QueryRedirectsTo(
1306 scoped_refptr<QueryRedirectsRequest> request, 1306 scoped_refptr<QueryRedirectsRequest> request,
1307 const GURL& url) { 1307 const GURL& url) {
1308 if (request->canceled()) 1308 if (request->canceled())
1309 return; 1309 return;
1310 bool success = GetMostRecentRedirectsTo(url, &request->value); 1310 bool success = GetMostRecentRedirectsTo(url, &request->value);
1311 request->ForwardResult(QueryRedirectsRequest::TupleType( 1311 request->ForwardResult(QueryRedirectsRequest::TupleType(
1312 request->handle(), url, success, &request->value)); 1312 request->handle(), url, success, &request->value));
1313 } 1313 }
1314 1314
1315 void HistoryBackend::GetVisitCountToHost( 1315 void HistoryBackend::GetVisibleVisitCountToHost(
1316 scoped_refptr<GetVisitCountToHostRequest> request, 1316 scoped_refptr<GetVisibleVisitCountToHostRequest> request,
1317 const GURL& url) { 1317 const GURL& url) {
1318 if (request->canceled()) 1318 if (request->canceled())
1319 return; 1319 return;
1320 int count = 0; 1320 int count = 0;
1321 Time first_visit; 1321 Time first_visit;
1322 const bool success = (db_.get() && db_->GetVisitCountToHost(url, &count, 1322 const bool success = db_.get() &&
1323 &first_visit)); 1323 db_->GetVisibleVisitCountToHost(url, &count, &first_visit);
1324 request->ForwardResult(GetVisitCountToHostRequest::TupleType( 1324 request->ForwardResult(GetVisibleVisitCountToHostRequest::TupleType(
1325 request->handle(), success, count, first_visit)); 1325 request->handle(), success, count, first_visit));
1326 } 1326 }
1327 1327
1328 void HistoryBackend::QueryTopURLsAndRedirects( 1328 void HistoryBackend::QueryTopURLsAndRedirects(
1329 scoped_refptr<QueryTopURLsAndRedirectsRequest> request, 1329 scoped_refptr<QueryTopURLsAndRedirectsRequest> request,
1330 int result_count) { 1330 int result_count) {
1331 if (request->canceled()) 1331 if (request->canceled())
1332 return; 1332 return;
1333 1333
1334 if (!db_.get()) { 1334 if (!db_.get()) {
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 return true; 2246 return true;
2247 } 2247 }
2248 2248
2249 BookmarkService* HistoryBackend::GetBookmarkService() { 2249 BookmarkService* HistoryBackend::GetBookmarkService() {
2250 if (bookmark_service_) 2250 if (bookmark_service_)
2251 bookmark_service_->BlockTillLoaded(); 2251 bookmark_service_->BlockTillLoaded();
2252 return bookmark_service_; 2252 return bookmark_service_;
2253 } 2253 }
2254 2254
2255 } // namespace history 2255 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_marshaling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698