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

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

Issue 6043: Added dangerous download prompting. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 // Handle updates for a particular download. This is a 'fire and forget' 463 // Handle updates for a particular download. This is a 'fire and forget'
464 // operation, so we don't need to be called back. 464 // operation, so we don't need to be called back.
465 void HistoryService::UpdateDownload(int64 received_bytes, 465 void HistoryService::UpdateDownload(int64 received_bytes,
466 int32 state, 466 int32 state,
467 int64 db_handle) { 467 int64 db_handle) {
468 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload, 468 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload,
469 received_bytes, state, db_handle); 469 received_bytes, state, db_handle);
470 } 470 }
471 471
472 void HistoryService::UpdateDownloadPath(const std::wstring& path,
473 int64 db_handle) {
474 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath,
475 path, db_handle);
476 }
477
472 void HistoryService::RemoveDownload(int64 db_handle) { 478 void HistoryService::RemoveDownload(int64 db_handle) {
473 ScheduleAndForget(PRIORITY_NORMAL, 479 ScheduleAndForget(PRIORITY_NORMAL,
474 &HistoryBackend::RemoveDownload, db_handle); 480 &HistoryBackend::RemoveDownload, db_handle);
475 } 481 }
476 482
477 void HistoryService::RemoveDownloadsBetween(Time remove_begin, 483 void HistoryService::RemoveDownloadsBetween(Time remove_begin,
478 Time remove_end) { 484 Time remove_end) {
479 ScheduleAndForget(PRIORITY_NORMAL, 485 ScheduleAndForget(PRIORITY_NORMAL,
480 &HistoryBackend::RemoveDownloadsBetween, 486 &HistoryBackend::RemoveDownloadsBetween,
481 remove_begin, 487 remove_begin,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 NotificationService::current()->Notify(type, source, det); 644 NotificationService::current()->Notify(type, source, det);
639 } 645 }
640 646
641 void HistoryService::OnDBLoaded() { 647 void HistoryService::OnDBLoaded() {
642 LOG(INFO) << "History backend finished loading"; 648 LOG(INFO) << "History backend finished loading";
643 backend_loaded_ = true; 649 backend_loaded_ = true;
644 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED, 650 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED,
645 Source<Profile>(profile_), 651 Source<Profile>(profile_),
646 Details<HistoryService>(this)); 652 Details<HistoryService>(this));
647 } 653 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698