| 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_TEST_ARCHIVER_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 OfflinePageTestArchiver( | 37 OfflinePageTestArchiver( |
| 38 Observer* observer, | 38 Observer* observer, |
| 39 const GURL& url, | 39 const GURL& url, |
| 40 ArchiverResult result, | 40 ArchiverResult result, |
| 41 int64_t size_to_report, | 41 int64_t size_to_report, |
| 42 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 42 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 43 ~OfflinePageTestArchiver() override; | 43 ~OfflinePageTestArchiver() override; |
| 44 | 44 |
| 45 // OfflinePageArchiver implementation: | 45 // OfflinePageArchiver implementation: |
| 46 void CreateArchive(const base::FilePath& archives_dir, | 46 void CreateArchive(const base::FilePath& archives_dir, |
| 47 int64_t archive_id, |
| 47 const CreateArchiveCallback& callback) override; | 48 const CreateArchiveCallback& callback) override; |
| 48 | 49 |
| 49 // Completes the creation of archive. Should be used with |set_delayed| set to | 50 // Completes the creation of archive. Should be used with |set_delayed| set to |
| 50 // ture. | 51 // ture. |
| 51 void CompleteCreateArchive(); | 52 void CompleteCreateArchive(); |
| 52 | 53 |
| 53 // When set to true, |CompleteCreateArchive| should be called explicitly for | 54 // When set to true, |CompleteCreateArchive| should be called explicitly for |
| 54 // the process to finish. | 55 // the process to finish. |
| 55 // TODO(fgorski): See if we can move this to the constructor. | 56 // TODO(fgorski): See if we can move this to the constructor. |
| 56 void set_delayed(bool delayed) { delayed_ = delayed; } | 57 void set_delayed(bool delayed) { delayed_ = delayed; } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 bool delayed_; | 74 bool delayed_; |
| 74 CreateArchiveCallback callback_; | 75 CreateArchiveCallback callback_; |
| 75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 76 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver); | 78 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace offline_pages | 81 } // namespace offline_pages |
| 81 | 82 |
| 82 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ | 83 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ |
| OLD | NEW |