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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Values used in the database for DownloadItem::DangerType | 87 // Values used in the database for DownloadItem::DangerType |
88 static const int kDangerTypeInvalid; | 88 static const int kDangerTypeInvalid; |
89 static const int kDangerTypeNotDangerous; | 89 static const int kDangerTypeNotDangerous; |
90 static const int kDangerTypeDangerousFile; | 90 static const int kDangerTypeDangerousFile; |
91 static const int kDangerTypeDangerousUrl; | 91 static const int kDangerTypeDangerousUrl; |
92 static const int kDangerTypeDangerousContent; | 92 static const int kDangerTypeDangerousContent; |
93 static const int kDangerTypeMaybeDangerousContent; | 93 static const int kDangerTypeMaybeDangerousContent; |
94 static const int kDangerTypeUncommonContent; | 94 static const int kDangerTypeUncommonContent; |
95 static const int kDangerTypeUserValidated; | 95 static const int kDangerTypeUserValidated; |
96 static const int kDangerTypeDangerousHost; | 96 static const int kDangerTypeDangerousHost; |
| 97 static const int kDangerTypePotentiallyUnwanted; |
97 | 98 |
98 // Fixes state of the download entries. Sometimes entries with IN_PROGRESS | 99 // Fixes state of the download entries. Sometimes entries with IN_PROGRESS |
99 // state are not updated during browser shutdown (particularly when crashing). | 100 // state are not updated during browser shutdown (particularly when crashing). |
100 // On the next start such entries are considered interrupted with | 101 // On the next start such entries are considered interrupted with |
101 // interrupt reason |DOWNLOAD_INTERRUPT_REASON_CRASH|. This function | 102 // interrupt reason |DOWNLOAD_INTERRUPT_REASON_CRASH|. This function |
102 // fixes such entries. | 103 // fixes such entries. |
103 void EnsureInProgressEntriesCleanedUp(); | 104 void EnsureInProgressEntriesCleanedUp(); |
104 | 105 |
105 bool EnsureColumnExists(const std::string& name, const std::string& type); | 106 bool EnsureColumnExists(const std::string& name, const std::string& type); |
106 | 107 |
(...skipping 15 matching lines...) Expand all Loading... |
122 // doing the cleanup until after any DB migration and unless we are | 123 // doing the cleanup until after any DB migration and unless we are |
123 // actually use the downloads database. | 124 // actually use the downloads database. |
124 bool in_progress_entry_cleanup_completed_; | 125 bool in_progress_entry_cleanup_completed_; |
125 | 126 |
126 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); | 127 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); |
127 }; | 128 }; |
128 | 129 |
129 } // namespace history | 130 } // namespace history |
130 | 131 |
131 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_ | 132 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_ |
OLD | NEW |