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

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

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__ 5 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__
6 #define CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__ 6 #define CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__
7 7
8 #include "chrome/browser/history/history_types.h" 8 #include "chrome/browser/history/history_types.h"
9 9
10 struct sqlite3; 10 struct sqlite3;
(...skipping 22 matching lines...) Expand all
33 // Create a new database entry for one download and return its primary db id. 33 // Create a new database entry for one download and return its primary db id.
34 int64 CreateDownload(const DownloadCreateInfo& info); 34 int64 CreateDownload(const DownloadCreateInfo& info);
35 35
36 // Remove a download from the database. 36 // Remove a download from the database.
37 void RemoveDownload(DownloadID db_handle); 37 void RemoveDownload(DownloadID db_handle);
38 38
39 // Remove all completed downloads that started after |remove_begin| 39 // Remove all completed downloads that started after |remove_begin|
40 // (inclusive) and before |remove_end|. You may use null Time values 40 // (inclusive) and before |remove_end|. You may use null Time values
41 // to do an unbounded delete in either direction. This function ignores 41 // to do an unbounded delete in either direction. This function ignores
42 // all downloads that are in progress or are waiting to be cancelled. 42 // all downloads that are in progress or are waiting to be cancelled.
43 void RemoveDownloadsBetween(Time remove_begin, Time remove_end); 43 void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end);
44 44
45 // Search for downloads matching the search text. 45 // Search for downloads matching the search text.
46 void SearchDownloads(std::vector<int64>* results, 46 void SearchDownloads(std::vector<int64>* results,
47 const std::wstring& search_text); 47 const std::wstring& search_text);
48 48
49 protected: 49 protected:
50 // Returns the database and statement cache for the functions in this 50 // Returns the database and statement cache for the functions in this
51 // interface. The descendant of this class implements these functions to 51 // interface. The descendant of this class implements these functions to
52 // return its objects. 52 // return its objects.
53 virtual sqlite3* GetDB() = 0; 53 virtual sqlite3* GetDB() = 0;
54 virtual SqliteStatementCache& GetStatementCache() = 0; 54 virtual SqliteStatementCache& GetStatementCache() = 0;
55 55
56 // Creates the downloads table if needed. 56 // Creates the downloads table if needed.
57 bool InitDownloadTable(); 57 bool InitDownloadTable();
58 58
59 // Used to quickly clear the downloads. First you would drop it, then you 59 // Used to quickly clear the downloads. First you would drop it, then you
60 // would re-initialize it. 60 // would re-initialize it.
61 bool DropDownloadTable(); 61 bool DropDownloadTable();
62 62
63 private: 63 private:
64 DISALLOW_EVIL_CONSTRUCTORS(DownloadDatabase); 64 DISALLOW_EVIL_CONSTRUCTORS(DownloadDatabase);
65 }; 65 };
66 66
67 } // namespace history 67 } // namespace history
68 68
69 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__ 69 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__
70 70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698