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

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

Issue 10665049: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 // Begins a request to clean up entries that has been corrupted (because of 473 // Begins a request to clean up entries that has been corrupted (because of
474 // the crash, for example). 474 // the crash, for example).
475 void CleanUpInProgressEntries(); 475 void CleanUpInProgressEntries();
476 476
477 // Called to update the history service about the current state of a download. 477 // Called to update the history service about the current state of a download.
478 // This is a 'fire and forget' query, so just pass the relevant state info to 478 // This is a 'fire and forget' query, so just pass the relevant state info to
479 // the database with no need for a callback. 479 // the database with no need for a callback.
480 void UpdateDownload(const content::DownloadPersistentStoreInfo& data); 480 void UpdateDownload(const content::DownloadPersistentStoreInfo& data);
481 481
482 // Called to update the history service about the path of a download. 482 // Permanently remove a set of downloads from the history system. This is a
483 // This is a 'fire and forget' query. 483 // 'fire and forget' operation.
484 void UpdateDownloadPath(const FilePath& path, int64 db_handle); 484 void RemoveDownloads(const std::set<int64>& handles);
485
486 // Permanently remove a download from the history system. This is a 'fire and
487 // forget' operation.
488 void RemoveDownload(int64 db_handle);
489
490 // Permanently removes all completed download from the history system within
491 // the specified range. This function does not delete downloads that are in
492 // progress or in the process of being cancelled. This is a 'fire and forget'
493 // operation. You can pass is_null times to get unbounded time in either or
494 // both directions.
495 void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end);
496 485
497 // Visit Segments ------------------------------------------------------------ 486 // Visit Segments ------------------------------------------------------------
498 487
499 typedef base::Callback<void(Handle, std::vector<PageUsageData*>*)> 488 typedef base::Callback<void(Handle, std::vector<PageUsageData*>*)>
500 SegmentQueryCallback; 489 SegmentQueryCallback;
501 490
502 // Query usage data for all visit segments since the provided time. 491 // Query usage data for all visit segments since the provided time.
503 // 492 //
504 // The request is performed asynchronously and can be cancelled by using the 493 // The request is performed asynchronously and can be cancelled by using the
505 // returned handle. 494 // returned handle.
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 // The index used for quick history lookups. 939 // The index used for quick history lookups.
951 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 940 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
952 941
953 scoped_refptr<ObserverListThreadSafe<history::VisitDatabaseObserver> > 942 scoped_refptr<ObserverListThreadSafe<history::VisitDatabaseObserver> >
954 visit_database_observers_; 943 visit_database_observers_;
955 944
956 DISALLOW_COPY_AND_ASSIGN(HistoryService); 945 DISALLOW_COPY_AND_ASSIGN(HistoryService);
957 }; 946 };
958 947
959 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ 948 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698