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_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 : public base::RefCountedThreadSafe<BrowsingDataFileSystemHelper> { | 43 : public base::RefCountedThreadSafe<BrowsingDataFileSystemHelper> { |
44 public: | 44 public: |
45 // Detailed information about a file system, including it's origin GURL, | 45 // Detailed information about a file system, including it's origin GURL, |
46 // the presence or absence of persistent and temporary storage, and the | 46 // the presence or absence of persistent and temporary storage, and the |
47 // amount of data (in bytes) each contains. | 47 // amount of data (in bytes) each contains. |
48 struct FileSystemInfo { | 48 struct FileSystemInfo { |
49 FileSystemInfo( | 49 FileSystemInfo( |
50 const GURL& origin, | 50 const GURL& origin, |
51 bool has_persistent, | 51 bool has_persistent, |
52 bool has_temporary, | 52 bool has_temporary, |
| 53 bool has_syncable, |
53 int64 usage_persistent, | 54 int64 usage_persistent, |
54 int64 usage_temporary); | 55 int64 usage_temporary, |
| 56 int64 usage_syncable); |
55 ~FileSystemInfo(); | 57 ~FileSystemInfo(); |
56 | 58 |
57 // The origin for which the information is relevant. | 59 // The origin for which the information is relevant. |
58 GURL origin; | 60 GURL origin; |
59 // True if the origin has a persistent file system. | 61 // True if the origin has a persistent file system. |
60 bool has_persistent; | 62 bool has_persistent; |
61 // True if the origin has a temporary file system. | 63 // True if the origin has a temporary file system. |
62 bool has_temporary; | 64 bool has_temporary; |
| 65 // True if the origin has a syncable file system. |
| 66 bool has_syncable; |
63 // Persistent file system usage, in bytes. | 67 // Persistent file system usage, in bytes. |
64 int64 usage_persistent; | 68 int64 usage_persistent; |
65 // Temporary file system usage, in bytes. | 69 // Temporary file system usage, in bytes. |
66 int64 usage_temporary; | 70 int64 usage_temporary; |
| 71 // Syncable file system usage, in bytes. |
| 72 int64 usage_syncable; |
67 }; | 73 }; |
68 | 74 |
69 // Creates a BrowsingDataFileSystemHelper instance for the file systems | 75 // Creates a BrowsingDataFileSystemHelper instance for the file systems |
70 // stored in |profile|'s user data directory. The BrowsingDataFileSystemHelper | 76 // stored in |profile|'s user data directory. The BrowsingDataFileSystemHelper |
71 // object will hold a reference to the Profile that's passed in, but is not | 77 // object will hold a reference to the Profile that's passed in, but is not |
72 // responsible for destroying it. | 78 // responsible for destroying it. |
73 // | 79 // |
74 // The BrowsingDataFileSystemHelper will not change the profile itself, but | 80 // The BrowsingDataFileSystemHelper will not change the profile itself, but |
75 // can modify data it contains (by removing file systems). | 81 // can modify data it contains (by removing file systems). |
76 static BrowsingDataFileSystemHelper* Create( | 82 static BrowsingDataFileSystemHelper* Create( |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // Indicates whether or not we're currently fetching information: set to true | 179 // Indicates whether or not we're currently fetching information: set to true |
174 // when StartFetching is called on the UI thread, and reset to false when | 180 // when StartFetching is called on the UI thread, and reset to false when |
175 // NotifyOnUIThread triggers the success callback. | 181 // NotifyOnUIThread triggers the success callback. |
176 // This property only mutates on the UI thread. | 182 // This property only mutates on the UI thread. |
177 bool is_fetching_; | 183 bool is_fetching_; |
178 | 184 |
179 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataFileSystemHelper); | 185 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataFileSystemHelper); |
180 }; | 186 }; |
181 | 187 |
182 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ | 188 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILE_SYSTEM_HELPER_H_ |
OLD | NEW |