| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual void GetAllArchives( | 56 virtual void GetAllArchives( |
| 57 const base::Callback<void(const std::set<base::FilePath>&)>& callback) | 57 const base::Callback<void(const std::set<base::FilePath>&)>& callback) |
| 58 const; | 58 const; |
| 59 | 59 |
| 60 // Gets stats about archive storage, i.e. total archive sizes and free disk | 60 // Gets stats about archive storage, i.e. total archive sizes and free disk |
| 61 // space. | 61 // space. |
| 62 virtual void GetStorageStats( | 62 virtual void GetStorageStats( |
| 63 const base::Callback<void(const StorageStats& storage_sizes)>& callback) | 63 const base::Callback<void(const StorageStats& storage_sizes)>& callback) |
| 64 const; | 64 const; |
| 65 | 65 |
| 66 protected: |
| 67 ArchiveManager(); |
| 68 |
| 66 private: | 69 private: |
| 67 // Path under which all of the managed archives should be stored. | 70 // Path under which all of the managed archives should be stored. |
| 68 base::FilePath archives_dir_; | 71 base::FilePath archives_dir_; |
| 69 // Task runner for running file operations. | 72 // Task runner for running file operations. |
| 70 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 73 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 } // namespace offline_pages | 76 } // namespace offline_pages |
| 74 | 77 |
| 75 #endif // COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ | 78 #endif // COMPONENTS_OFFLINE_PAGES_ARCHIVE_MANAGER_H_ |
| OLD | NEW |