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

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

Issue 7847027: DownloadId (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 HistoryService::Handle HistoryService::CreateDownload( 507 HistoryService::Handle HistoryService::CreateDownload(
508 int32 id, 508 int32 id,
509 const DownloadPersistentStoreInfo& create_info, 509 const DownloadPersistentStoreInfo& create_info,
510 CancelableRequestConsumerBase* consumer, 510 CancelableRequestConsumerBase* consumer,
511 HistoryService::DownloadCreateCallback* callback) { 511 HistoryService::DownloadCreateCallback* callback) {
512 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer, 512 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer,
513 new history::DownloadCreateRequest(callback), id, 513 new history::DownloadCreateRequest(callback), id,
514 create_info); 514 create_info);
515 } 515 }
516 516
517 HistoryService::Handle HistoryService::GetNextDownloadId(
518 CancelableRequestConsumerBase* consumer,
519 DownloadNextIdCallback* callback) {
520 return Schedule(PRIORITY_NORMAL, &HistoryBackend::GetNextDownloadId, consumer,
521 new history::DownloadNextIdRequest(callback));
522 }
523
517 // Handle queries for a list of all downloads in the history database's 524 // Handle queries for a list of all downloads in the history database's
518 // 'downloads' table. 525 // 'downloads' table.
519 HistoryService::Handle HistoryService::QueryDownloads( 526 HistoryService::Handle HistoryService::QueryDownloads(
520 CancelableRequestConsumerBase* consumer, 527 CancelableRequestConsumerBase* consumer,
521 DownloadQueryCallback* callback) { 528 DownloadQueryCallback* callback) {
522 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryDownloads, consumer, 529 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryDownloads, consumer,
523 new history::DownloadQueryRequest(callback)); 530 new history::DownloadQueryRequest(callback));
524 } 531 }
525 532
526 // Changes all IN_PROGRESS in the database entries to CANCELED. 533 // Changes all IN_PROGRESS in the database entries to CANCELED.
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 827 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
821 if (ts) 828 if (ts)
822 ts->MigrateFromHistory(); 829 ts->MigrateFromHistory();
823 } 830 }
824 } 831 }
825 832
826 void HistoryService::OnTopSitesReady() { 833 void HistoryService::OnTopSitesReady() {
827 ScheduleAndForget(PRIORITY_NORMAL, 834 ScheduleAndForget(PRIORITY_NORMAL,
828 &HistoryBackend::MigrateThumbnailsDatabase); 835 &HistoryBackend::MigrateThumbnailsDatabase);
829 } 836 }
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