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

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: fixed tests 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
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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 // Changes all IN_PROGRESS in the database entries to CANCELED. 535 // Changes all IN_PROGRESS in the database entries to CANCELED.
536 // IN_PROGRESS entries are the corrupted entries, not updated by next function 536 // IN_PROGRESS entries are the corrupted entries, not updated by next function
537 // because of the crash or some other extremal exit. 537 // because of the crash or some other extremal exit.
538 void HistoryService::CleanUpInProgressEntries() { 538 void HistoryService::CleanUpInProgressEntries() {
539 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CleanUpInProgressEntries); 539 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CleanUpInProgressEntries);
540 } 540 }
541 541
542 // Handle updates for a particular download. This is a 'fire and forget' 542 // Handle updates for a particular download. This is a 'fire and forget'
543 // operation, so we don't need to be called back. 543 // operation, so we don't need to be called back.
544 void HistoryService::UpdateDownload(int64 received_bytes, 544 void HistoryService::UpdateDownload(history::DownloadItemData data) {
brettw 2011/10/01 16:45:45 This should be a const ref instead of a copy.
benjhayden 2011/10/03 20:54:39 Done.
545 int32 state, 545 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload, data);
546 int64 db_handle) {
547 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload,
548 received_bytes, state, db_handle);
549 } 546 }
550 547
551 void HistoryService::UpdateDownloadPath(const FilePath& path, 548 void HistoryService::UpdateDownloadPath(const FilePath& path,
552 int64 db_handle) { 549 int64 db_handle) {
553 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath, 550 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath,
554 path, db_handle); 551 path, db_handle);
555 } 552 }
556 553
557 void HistoryService::RemoveDownload(int64 db_handle) { 554 void HistoryService::RemoveDownload(int64 db_handle) {
558 ScheduleAndForget(PRIORITY_NORMAL, 555 ScheduleAndForget(PRIORITY_NORMAL,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 828 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
832 if (ts) 829 if (ts)
833 ts->MigrateFromHistory(); 830 ts->MigrateFromHistory();
834 } 831 }
835 } 832 }
836 833
837 void HistoryService::OnTopSitesReady() { 834 void HistoryService::OnTopSitesReady() {
838 ScheduleAndForget(PRIORITY_NORMAL, 835 ScheduleAndForget(PRIORITY_NORMAL,
839 &HistoryBackend::MigrateThumbnailsDatabase); 836 &HistoryBackend::MigrateThumbnailsDatabase);
840 } 837 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698