Chromium Code Reviews| Index: chrome/browser/browsing_data_indexed_db_helper.h |
| =================================================================== |
| --- chrome/browser/browsing_data_indexed_db_helper.h (revision 97265) |
| +++ chrome/browser/browsing_data_indexed_db_helper.h (working copy) |
| @@ -32,26 +32,16 @@ |
| // Contains detailed information about an indexed database. |
| struct IndexedDBInfo { |
| IndexedDBInfo( |
| - const std::string& protocol, |
| - const std::string& host, |
| - unsigned short port, |
| - const std::string& database_identifier, |
| - const std::string& origin, |
| - const FilePath& file_path, |
| + const GURL& origin_url, |
| int64 size, |
| base::Time last_modified); |
| ~IndexedDBInfo(); |
| bool IsFileSchemeData() { |
| - return protocol == chrome::kFileScheme; |
| + return origin_url.SchemeIsFile(); |
| } |
| - std::string protocol; |
| - std::string host; |
| - unsigned short port; |
| - std::string database_identifier; |
| - std::string origin; |
| - FilePath file_path; |
|
michaeln
2011/08/23 20:39:48
Simplified this structure getting rid of duplicito
|
| + GURL origin_url; |
| int64 size; |
| base::Time last_modified; |
| }; |
| @@ -70,7 +60,7 @@ |
| // This must be called only in the UI thread. |
| virtual void CancelNotification() = 0; |
| // Requests a single indexed database file to be deleted in the WEBKIT thread. |
| - virtual void DeleteIndexedDBFile(const FilePath& file_path) = 0; |
| + virtual void DeleteIndexedDB(const GURL& origin_url) = 0; |
| protected: |
| friend class base::RefCountedThreadSafe<BrowsingDataIndexedDBHelper>; |
| @@ -83,7 +73,7 @@ |
| class CannedBrowsingDataIndexedDBHelper |
| : public BrowsingDataIndexedDBHelper { |
| public: |
| - explicit CannedBrowsingDataIndexedDBHelper(Profile* profile); |
| + CannedBrowsingDataIndexedDBHelper(); |
| // Return a copy of the IndexedDB helper. Only one consumer can use the |
| // StartFetching method at a time, so we need to create a copy of the helper |
| @@ -105,7 +95,7 @@ |
| virtual void StartFetching( |
| Callback1<const std::list<IndexedDBInfo>& >::Type* callback); |
| virtual void CancelNotification(); |
| - virtual void DeleteIndexedDBFile(const FilePath& file_path) {} |
| + virtual void DeleteIndexedDB(const GURL& origin_url) {} |
| private: |
| struct PendingIndexedDBInfo { |
| @@ -124,8 +114,6 @@ |
| void NotifyInUIThread(); |
| - Profile* profile_; |
| - |
| // Lock to protect access to pending_indexed_db_info_; |
| mutable base::Lock lock_; |