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

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

Issue 7237034: sql::MetaTable.next_download_id, DownloadManager::GetNextId() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix merge 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
1079 // Get all the download entries from the database. 1090 // Get all the download entries from the database.
1080 void HistoryBackend::QueryDownloads( 1091 void HistoryBackend::QueryDownloads(
1081 scoped_refptr<DownloadQueryRequest> request) { 1092 scoped_refptr<DownloadQueryRequest> request) {
1082 if (request->canceled()) 1093 if (request->canceled())
1083 return; 1094 return;
1084 if (db_.get()) 1095 if (db_.get())
1085 db_->QueryDownloads(&request->value); 1096 db_->QueryDownloads(&request->value);
1086 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value)); 1097 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value));
1087 } 1098 }
1088 1099
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 return true; 2240 return true;
2230 } 2241 }
2231 2242
2232 BookmarkService* HistoryBackend::GetBookmarkService() { 2243 BookmarkService* HistoryBackend::GetBookmarkService() {
2233 if (bookmark_service_) 2244 if (bookmark_service_)
2234 bookmark_service_->BlockTillLoaded(); 2245 bookmark_service_->BlockTillLoaded();
2235 return bookmark_service_; 2246 return bookmark_service_;
2236 } 2247 }
2237 2248
2238 } // namespace history 2249 } // 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