| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OFFLINE_PAGE_ARCHIVER_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 typedef base::Callback<void(OfflinePageArchiver* /* archiver */, | 59 typedef base::Callback<void(OfflinePageArchiver* /* archiver */, |
| 60 ArchiverResult /* result */, | 60 ArchiverResult /* result */, |
| 61 const GURL& /* url */, | 61 const GURL& /* url */, |
| 62 const base::FilePath& /* file_path */, | 62 const base::FilePath& /* file_path */, |
| 63 int64_t /* file_size */)> CreateArchiveCallback; | 63 int64_t /* file_size */)> CreateArchiveCallback; |
| 64 | 64 |
| 65 virtual ~OfflinePageArchiver() {} | 65 virtual ~OfflinePageArchiver() {} |
| 66 | 66 |
| 67 // Starts creating the archive in the |archives_dir|. Once archive is created | 67 // Starts creating the archive in the |archives_dir| with |archive_id| added |
| 68 // |callback| will be called with the result and additional information. | 68 // to the archive filename. Once archive is created |callback| will be called |
| 69 // with the result and additional information. |
| 69 virtual void CreateArchive(const base::FilePath& archives_dir, | 70 virtual void CreateArchive(const base::FilePath& archives_dir, |
| 71 int64_t archive_id, |
| 70 const CreateArchiveCallback& callback) = 0; | 72 const CreateArchiveCallback& callback) = 0; |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace offline_pages | 75 } // namespace offline_pages |
| 74 | 76 |
| 75 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ | 77 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ |
| OLD | NEW |