OLD | NEW |
---|---|
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 Loading... | |
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 } | |
1085 request->ForwardResult(DownloadNextIdRequest::TupleType(request->value)); | |
Randy Smith (Not in Mondays)
2011/07/28 21:03:16
This seems like it'll leave an uninitialized value
benjhayden
2011/08/03 17:44:46
Done.
For this cl, while DownloadManager says nex
Randy Smith (Not in Mondays)
2011/08/03 21:10:29
Yes--no collisions to avoid. There may be circums
benjhayden
2011/08/04 17:15:00
Done.
| |
1086 } | |
1087 | |
1079 // Get all the download entries from the database. | 1088 // Get all the download entries from the database. |
1080 void HistoryBackend::QueryDownloads( | 1089 void HistoryBackend::QueryDownloads( |
1081 scoped_refptr<DownloadQueryRequest> request) { | 1090 scoped_refptr<DownloadQueryRequest> request) { |
1082 if (request->canceled()) | 1091 if (request->canceled()) |
1083 return; | 1092 return; |
1084 if (db_.get()) | 1093 if (db_.get()) |
1085 db_->QueryDownloads(&request->value); | 1094 db_->QueryDownloads(&request->value); |
1086 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value)); | 1095 request->ForwardResult(DownloadQueryRequest::TupleType(&request->value)); |
1087 } | 1096 } |
1088 | 1097 |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2229 return true; | 2238 return true; |
2230 } | 2239 } |
2231 | 2240 |
2232 BookmarkService* HistoryBackend::GetBookmarkService() { | 2241 BookmarkService* HistoryBackend::GetBookmarkService() { |
2233 if (bookmark_service_) | 2242 if (bookmark_service_) |
2234 bookmark_service_->BlockTillLoaded(); | 2243 bookmark_service_->BlockTillLoaded(); |
2235 return bookmark_service_; | 2244 return bookmark_service_; |
2236 } | 2245 } |
2237 | 2246 |
2238 } // namespace history | 2247 } // namespace history |
OLD | NEW |