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

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

Issue 19863005: Warn users about potentially unwanted downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a "Learn more" URL for unwanted downloads. Created 7 years, 5 months 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) 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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api.cc ('k') | chrome/browser/history/download_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698