OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... |
31 : public base::RefCountedThreadSafe<BrowsingDataIndexedDBHelper> { | 31 : public base::RefCountedThreadSafe<BrowsingDataIndexedDBHelper> { |
32 public: | 32 public: |
33 // Contains detailed information about an indexed database. | 33 // Contains detailed information about an indexed database. |
34 struct IndexedDBInfo { | 34 struct IndexedDBInfo { |
35 IndexedDBInfo( | 35 IndexedDBInfo( |
36 const GURL& origin, | 36 const GURL& origin, |
37 int64 size, | 37 int64 size, |
38 base::Time last_modified); | 38 base::Time last_modified); |
39 ~IndexedDBInfo(); | 39 ~IndexedDBInfo(); |
40 | 40 |
41 bool IsFileSchemeData() { | |
42 return origin.SchemeIsFile(); | |
43 } | |
44 | |
45 GURL origin; | 41 GURL origin; |
46 int64 size; | 42 int64 size; |
47 base::Time last_modified; | 43 base::Time last_modified; |
48 }; | 44 }; |
49 | 45 |
50 // Create a BrowsingDataIndexedDBHelper instance for the indexed databases | 46 // Create a BrowsingDataIndexedDBHelper instance for the indexed databases |
51 // stored in |profile|'s user data directory. | 47 // stored in |profile|'s user data directory. |
52 static BrowsingDataIndexedDBHelper* Create(Profile* profile); | 48 static BrowsingDataIndexedDBHelper* Create(Profile* profile); |
53 | 49 |
54 // Starts the fetching process, which will notify its completion via | 50 // Starts the fetching process, which will notify its completion via |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Indicates whether or not we're currently fetching information: | 128 // Indicates whether or not we're currently fetching information: |
133 // it's true when StartFetching() is called in the UI thread, and it's reset | 129 // it's true when StartFetching() is called in the UI thread, and it's reset |
134 // after we notified the callback in the UI thread. | 130 // after we notified the callback in the UI thread. |
135 // This only mutates on the UI thread. | 131 // This only mutates on the UI thread. |
136 bool is_fetching_; | 132 bool is_fetching_; |
137 | 133 |
138 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper); | 134 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper); |
139 }; | 135 }; |
140 | 136 |
141 #endif // CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 137 #endif // CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
OLD | NEW |