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

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

Issue 7793003: Revert 98656 - Make a new integer field in sql::MetaTable (a per-profile db) containing a counter... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 db_->GetMostRecentKeywordSearchTerms(keyword_id, prefix, max_count, 1069 db_->GetMostRecentKeywordSearchTerms(keyword_id, prefix, max_count,
1070 &(request->value)); 1070 &(request->value));
1071 } 1071 }
1072 request->ForwardResult( 1072 request->ForwardResult(
1073 GetMostRecentKeywordSearchTermsRequest::TupleType(request->handle(), 1073 GetMostRecentKeywordSearchTermsRequest::TupleType(request->handle(),
1074 &request->value)); 1074 &request->value));
1075 } 1075 }
1076 1076
1077 // Downloads ------------------------------------------------------------------- 1077 // Downloads -------------------------------------------------------------------
1078 1078
1079 void HistoryBackend::GetNextDownloadId(
1080 scoped_refptr<DownloadNextIdRequest> request) {
1081 if (request->canceled()) return;
1082 if (db_.get()) {
1083 request->value = db_->next_download_id();
1084 } else {
1085 request->value = 0;
1086 }
1087 request->ForwardResult(DownloadNextIdRequest::TupleType(request->value));
1088 }
1089
1090 // Get all the download entries from the database. 1079 // Get all the download entries from the database.
1091 void HistoryBackend::QueryDownloads( 1080 void HistoryBackend::QueryDownloads(
1092 scoped_refptr<DownloadQueryRequest> request) { 1081 scoped_refptr<DownloadQueryRequest> request) {
1093 if (request->canceled()) 1082 if (request->canceled())
1094 return; 1083 return;
1095 if (db_.get()) 1084 if (db_.get())
1096 db_->QueryDownloads(&request->value); 1085 db_->QueryDownloads(&request->value);
1097 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value)); 1086 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value));
1098 } 1087 }
1099 1088
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 return true; 2229 return true;
2241 } 2230 }
2242 2231
2243 BookmarkService* HistoryBackend::GetBookmarkService() { 2232 BookmarkService* HistoryBackend::GetBookmarkService() {
2244 if (bookmark_service_) 2233 if (bookmark_service_)
2245 bookmark_service_->BlockTillLoaded(); 2234 bookmark_service_->BlockTillLoaded();
2246 return bookmark_service_; 2235 return bookmark_service_;
2247 } 2236 }
2248 2237
2249 } // namespace history 2238 } // 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