| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 bool MigrateReferrer(); | 72 bool MigrateReferrer(); |
| 73 | 73 |
| 74 // Returns true if able to successfully add the by_ext_id and by_ext_name | 74 // Returns true if able to successfully add the by_ext_id and by_ext_name |
| 75 // columns to the downloads table. | 75 // columns to the downloads table. |
| 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 |
| 83 // download table. |
| 84 bool MigrateHashHttpMethodAndGenerateGuids(); |
| 85 |
| 82 // Creates the downloads table if needed. | 86 // Creates the downloads table if needed. |
| 83 bool InitDownloadTable(); | 87 bool InitDownloadTable(); |
| 84 | 88 |
| 85 // Used to quickly clear the downloads. First you would drop it, then you | 89 // Used to quickly clear the downloads. First you would drop it, then you |
| 86 // would re-initialize it. | 90 // would re-initialize it. |
| 87 bool DropDownloadTable(); | 91 bool DropDownloadTable(); |
| 88 | 92 |
| 89 private: | 93 private: |
| 90 FRIEND_TEST_ALL_PREFIXES(HistoryBackendDBTest, | 94 FRIEND_TEST_ALL_PREFIXES(HistoryBackendDBTest, |
| 91 ConfirmDownloadInProgressCleanup); | 95 ConfirmDownloadInProgressCleanup); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 116 // to use for respectively an undefined value and in case of a crash. | 120 // to use for respectively an undefined value and in case of a crash. |
| 117 DownloadInterruptReason download_interrupt_reason_none_; | 121 DownloadInterruptReason download_interrupt_reason_none_; |
| 118 DownloadInterruptReason download_interrupt_reason_crash_; | 122 DownloadInterruptReason download_interrupt_reason_crash_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); | 124 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 } // namespace history | 127 } // namespace history |
| 124 | 128 |
| 125 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ | 129 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_DATABASE_H_ |
| OLD | NEW |