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

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

Issue 319703002: Add mime type information to the download database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DownloadUIController_HistoryDownload test failure Created 6 years, 6 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Remove |id| from the database. 46 // Remove |id| from the database.
47 void RemoveDownload(uint32 id); 47 void RemoveDownload(uint32 id);
48 48
49 size_t CountDownloads(); 49 size_t CountDownloads();
50 50
51 protected: 51 protected:
52 // Returns the database for the functions in this interface. 52 // Returns the database for the functions in this interface.
53 virtual sql::Connection& GetDB() = 0; 53 virtual sql::Connection& GetDB() = 0;
54 54
55 // Returns true if able to successfully add mime types to the downloads table.
56 bool MigrateMimeType();
57
55 // Returns true if able to successfully rewrite the invalid values for the 58 // Returns true if able to successfully rewrite the invalid values for the
56 // |state| field from 3 to 4. Returns false if there was an error fixing the 59 // |state| field from 3 to 4. Returns false if there was an error fixing the
57 // database. See http://crbug.com/140687 60 // database. See http://crbug.com/140687
58 bool MigrateDownloadsState(); 61 bool MigrateDownloadsState();
59 62
60 // Returns true if able to successfully add the last interrupt reason and the 63 // Returns true if able to successfully add the last interrupt reason and the
61 // two target paths to downloads. 64 // two target paths to downloads.
62 bool MigrateDownloadsReasonPathsAndDangerType(); 65 bool MigrateDownloadsReasonPathsAndDangerType();
63 66
64 // Returns true if able to successfully add the referrer column to the 67 // Returns true if able to successfully add the referrer column to the
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // doing the cleanup until after any DB migration and unless we are 134 // doing the cleanup until after any DB migration and unless we are
132 // actually use the downloads database. 135 // actually use the downloads database.
133 bool in_progress_entry_cleanup_completed_; 136 bool in_progress_entry_cleanup_completed_;
134 137
135 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); 138 DISALLOW_COPY_AND_ASSIGN(DownloadDatabase);
136 }; 139 };
137 140
138 } // namespace history 141 } // namespace history
139 142
140 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_ 143 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc ('k') | chrome/browser/history/download_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698