OLD | NEW |
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_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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Returns true if able to successfully rewrite the invalid values for the | 61 // Returns true if able to successfully rewrite the invalid values for the |
62 // |state| field from 3 to 4. Returns false if there was an error fixing the | 62 // |state| field from 3 to 4. Returns false if there was an error fixing the |
63 // database. See http://crbug.com/140687 | 63 // database. See http://crbug.com/140687 |
64 bool MigrateDownloadsState(); | 64 bool MigrateDownloadsState(); |
65 | 65 |
66 // Returns true if able to successfully add the last interrupt reason and the | 66 // Returns true if able to successfully add the last interrupt reason and the |
67 // two target paths to downloads. | 67 // two target paths to downloads. |
68 bool MigrateDownloadsReasonPathsAndDangerType(); | 68 bool MigrateDownloadsReasonPathsAndDangerType(); |
69 | 69 |
| 70 // Returns true if able to successfully add the referrer column to the |
| 71 // downloads table. |
| 72 bool MigrateReferrer(); |
| 73 |
70 // Creates the downloads table if needed. | 74 // Creates the downloads table if needed. |
71 bool InitDownloadTable(); | 75 bool InitDownloadTable(); |
72 | 76 |
73 // Used to quickly clear the downloads. First you would drop it, then you | 77 // Used to quickly clear the downloads. First you would drop it, then you |
74 // would re-initialize it. | 78 // would re-initialize it. |
75 bool DropDownloadTable(); | 79 bool DropDownloadTable(); |
76 | 80 |
77 private: | 81 private: |
78 FRIEND_TEST_ALL_PREFIXES( | 82 FRIEND_TEST_ALL_PREFIXES( |
79 HistoryBackendDBTest, ConfirmDownloadInProgressCleanup); | 83 HistoryBackendDBTest, ConfirmDownloadInProgressCleanup); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // doing the cleanup until after any DB migration and unless we are | 131 // doing the cleanup until after any DB migration and unless we are |
128 // actually use the downloads database. | 132 // actually use the downloads database. |
129 bool in_progress_entry_cleanup_completed_; | 133 bool in_progress_entry_cleanup_completed_; |
130 | 134 |
131 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); | 135 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); |
132 }; | 136 }; |
133 | 137 |
134 } // namespace history | 138 } // namespace history |
135 | 139 |
136 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_ | 140 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_ |
OLD | NEW |