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

Side by Side Diff: chrome/browser/history/history.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.h ('k') | chrome/browser/history/history_backend.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 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 HistoryService::Handle HistoryService::CreateDownload( 504 HistoryService::Handle HistoryService::CreateDownload(
505 int32 id, 505 int32 id,
506 const DownloadPersistentStoreInfo& create_info, 506 const DownloadPersistentStoreInfo& create_info,
507 CancelableRequestConsumerBase* consumer, 507 CancelableRequestConsumerBase* consumer,
508 HistoryService::DownloadCreateCallback* callback) { 508 HistoryService::DownloadCreateCallback* callback) {
509 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer, 509 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer,
510 new history::DownloadCreateRequest(callback), id, 510 new history::DownloadCreateRequest(callback), id,
511 create_info); 511 create_info);
512 } 512 }
513 513
514 HistoryService::Handle HistoryService::GetNextDownloadId(
515 CancelableRequestConsumerBase* consumer,
516 DownloadNextIdCallback* callback) {
517 return Schedule(PRIORITY_NORMAL, &HistoryBackend::GetNextDownloadId, consumer,
518 new history::DownloadNextIdRequest(callback));
519 }
520
514 // Handle queries for a list of all downloads in the history database's 521 // Handle queries for a list of all downloads in the history database's
515 // 'downloads' table. 522 // 'downloads' table.
516 HistoryService::Handle HistoryService::QueryDownloads( 523 HistoryService::Handle HistoryService::QueryDownloads(
517 CancelableRequestConsumerBase* consumer, 524 CancelableRequestConsumerBase* consumer,
518 DownloadQueryCallback* callback) { 525 DownloadQueryCallback* callback) {
519 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryDownloads, consumer, 526 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryDownloads, consumer,
520 new history::DownloadQueryRequest(callback)); 527 new history::DownloadQueryRequest(callback));
521 } 528 }
522 529
523 // Changes all IN_PROGRESS in the database entries to CANCELED. 530 // Changes all IN_PROGRESS in the database entries to CANCELED.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 805 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
799 if (ts) 806 if (ts)
800 ts->MigrateFromHistory(); 807 ts->MigrateFromHistory();
801 } 808 }
802 } 809 }
803 810
804 void HistoryService::OnTopSitesReady() { 811 void HistoryService::OnTopSitesReady() {
805 ScheduleAndForget(PRIORITY_NORMAL, 812 ScheduleAndForget(PRIORITY_NORMAL,
806 &HistoryBackend::MigrateThumbnailsDatabase); 813 &HistoryBackend::MigrateThumbnailsDatabase);
807 } 814 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698