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

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

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 2 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 // Changes all IN_PROGRESS in the database entries to CANCELED. 550 // Changes all IN_PROGRESS in the database entries to CANCELED.
551 // IN_PROGRESS entries are the corrupted entries, not updated by next function 551 // IN_PROGRESS entries are the corrupted entries, not updated by next function
552 // because of the crash or some other extremal exit. 552 // because of the crash or some other extremal exit.
553 void HistoryService::CleanUpInProgressEntries() { 553 void HistoryService::CleanUpInProgressEntries() {
554 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CleanUpInProgressEntries); 554 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CleanUpInProgressEntries);
555 } 555 }
556 556
557 // Handle updates for a particular download. This is a 'fire and forget' 557 // Handle updates for a particular download. This is a 'fire and forget'
558 // operation, so we don't need to be called back. 558 // operation, so we don't need to be called back.
559 void HistoryService::UpdateDownload(int64 received_bytes, 559 void HistoryService::UpdateDownload(const DownloadPersistentStoreInfo& data) {
560 int32 state, 560 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload, data);
561 int64 db_handle) {
562 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload,
563 received_bytes, state, db_handle);
564 } 561 }
565 562
566 void HistoryService::UpdateDownloadPath(const FilePath& path, 563 void HistoryService::UpdateDownloadPath(const FilePath& path,
567 int64 db_handle) { 564 int64 db_handle) {
568 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath, 565 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath,
569 path, db_handle); 566 path, db_handle);
570 } 567 }
571 568
572 void HistoryService::RemoveDownload(int64 db_handle) { 569 void HistoryService::RemoveDownload(int64 db_handle) {
573 ScheduleAndForget(PRIORITY_NORMAL, 570 ScheduleAndForget(PRIORITY_NORMAL,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 843 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
847 if (ts) 844 if (ts)
848 ts->MigrateFromHistory(); 845 ts->MigrateFromHistory();
849 } 846 }
850 } 847 }
851 848
852 void HistoryService::OnTopSitesReady() { 849 void HistoryService::OnTopSitesReady() {
853 ScheduleAndForget(PRIORITY_NORMAL, 850 ScheduleAndForget(PRIORITY_NORMAL,
854 &HistoryBackend::MigrateThumbnailsDatabase); 851 &HistoryBackend::MigrateThumbnailsDatabase);
855 } 852 }
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