| 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 COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool MigrateDownloadedByExtension(); | 76 bool MigrateDownloadedByExtension(); |
| 77 | 77 |
| 78 // Returns true if able to successfully add the etag and last-modified columns | 78 // Returns true if able to successfully add the etag and last-modified columns |
| 79 // to the downloads table. | 79 // to the downloads table. |
| 80 bool MigrateDownloadValidators(); | 80 bool MigrateDownloadValidators(); |
| 81 | 81 |
| 82 // Returns true if able to add GUID, hash and HTTP method columns to the | 82 // Returns true if able to add GUID, hash and HTTP method columns to the |
| 83 // download table. | 83 // download table. |
| 84 bool MigrateHashHttpMethodAndGenerateGuids(); | 84 bool MigrateHashHttpMethodAndGenerateGuids(); |
| 85 | 85 |
| 86 // Returns true if able to add tab_url and tab_referrer_url columns to the |
| 87 // download table. |
| 88 bool MigrateDownloadTabUrl(); |
| 89 |
| 86 // Creates the downloads table if needed. | 90 // Creates the downloads table if needed. |
| 87 bool InitDownloadTable(); | 91 bool InitDownloadTable(); |
| 88 | 92 |
| 89 // Used to quickly clear the downloads. First you would drop it, then you | 93 // Used to quickly clear the downloads. First you would drop it, then you |
| 90 // would re-initialize it. | 94 // would re-initialize it. |
| 91 bool DropDownloadTable(); | 95 bool DropDownloadTable(); |
| 92 | 96 |
| 93 private: | 97 private: |
| 94 FRIEND_TEST_ALL_PREFIXES(HistoryBackendDBTest, | 98 FRIEND_TEST_ALL_PREFIXES(HistoryBackendDBTest, |
| 95 ConfirmDownloadInProgressCleanup); | 99 ConfirmDownloadInProgressCleanup); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 120 // to use for respectively an undefined value and in case of a crash. | 124 // to use for respectively an undefined value and in case of a crash. |
| 121 DownloadInterruptReason download_interrupt_reason_none_; | 125 DownloadInterruptReason download_interrupt_reason_none_; |
| 122 DownloadInterruptReason download_interrupt_reason_crash_; | 126 DownloadInterruptReason download_interrupt_reason_crash_; |
| 123 | 127 |
| 124 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); | 128 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 } // namespace history | 131 } // namespace history |
| 128 | 132 |
| 129 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ | 133 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ |
| OLD | NEW |