| 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 CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 13 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 16 #include "net/cookies/cookie_store.h" | 17 #include "net/cookies/cookie_store.h" |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 22 class SequencedTaskRunner; |
| 21 class Time; | 23 class Time; |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace storage { | 26 namespace storage { |
| 25 class FileSystemContext; | 27 class FileSystemContext; |
| 26 } | 28 } |
| 27 | 29 |
| 28 namespace net { | 30 namespace net { |
| 29 class URLRequestContextGetter; | 31 class URLRequestContextGetter; |
| 30 } | 32 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // Clears the HTTP and media caches associated with this StoragePartition's | 166 // Clears the HTTP and media caches associated with this StoragePartition's |
| 165 // request contexts. If |begin| and |end| are not null, only entries with | 167 // request contexts. If |begin| and |end| are not null, only entries with |
| 166 // timestamps inbetween are deleted. If |url_matcher| is not null, only | 168 // timestamps inbetween are deleted. If |url_matcher| is not null, only |
| 167 // entries with matching URLs are deleted. | 169 // entries with matching URLs are deleted. |
| 168 virtual void ClearHttpAndMediaCaches( | 170 virtual void ClearHttpAndMediaCaches( |
| 169 const base::Time begin, | 171 const base::Time begin, |
| 170 const base::Time end, | 172 const base::Time end, |
| 171 const base::Callback<bool(const GURL&)>& url_matcher, | 173 const base::Callback<bool(const GURL&)>& url_matcher, |
| 172 const base::Closure& callback) = 0; | 174 const base::Closure& callback) = 0; |
| 173 | 175 |
| 174 // Write any unwritten data to disk. | 176 // Write any unwritten data to disk, returns a collection of task runners |
| 177 // that have been tasked with writing data. |
| 175 // Note: this method does not sync the data - it only ensures that any | 178 // Note: this method does not sync the data - it only ensures that any |
| 176 // unwritten data has been written out to the filesystem. | 179 // unwritten data has been written out to the filesystem. |
| 177 virtual void Flush() = 0; | 180 virtual std::vector<scoped_refptr<base::SequencedTaskRunner>> Flush() = 0; |
| 178 | 181 |
| 179 // Clear the bluetooth allowed devices map. For test use only. | 182 // Clear the bluetooth allowed devices map. For test use only. |
| 180 virtual void ClearBluetoothAllowedDevicesMapForTesting() = 0; | 183 virtual void ClearBluetoothAllowedDevicesMapForTesting() = 0; |
| 181 | 184 |
| 182 protected: | 185 protected: |
| 183 virtual ~StoragePartition() {} | 186 virtual ~StoragePartition() {} |
| 184 }; | 187 }; |
| 185 | 188 |
| 186 } // namespace content | 189 } // namespace content |
| 187 | 190 |
| 188 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 191 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| OLD | NEW |