Chromium Code Reviews| 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_CORE_OFFLINE_PAGE_ARCHIVER_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 public: | 43 public: |
| 44 // Results of the archive creation. | 44 // Results of the archive creation. |
| 45 enum class ArchiverResult { | 45 enum class ArchiverResult { |
| 46 SUCCESSFULLY_CREATED, // Archive created successfully. | 46 SUCCESSFULLY_CREATED, // Archive created successfully. |
| 47 ERROR_DEVICE_FULL, // Cannot save the archive - device is full. | 47 ERROR_DEVICE_FULL, // Cannot save the archive - device is full. |
| 48 ERROR_CANCELED, // Caller canceled the request. | 48 ERROR_CANCELED, // Caller canceled the request. |
| 49 ERROR_CONTENT_UNAVAILABLE, // Content to archive is not available. | 49 ERROR_CONTENT_UNAVAILABLE, // Content to archive is not available. |
| 50 ERROR_ARCHIVE_CREATION_FAILED, // Creation of archive failed. | 50 ERROR_ARCHIVE_CREATION_FAILED, // Creation of archive failed. |
| 51 ERROR_SECURITY_CERTIFICATE, // Page was loaded on secure connection, but | 51 ERROR_SECURITY_CERTIFICATE, // Page was loaded on secure connection, but |
| 52 // there was a security error. | 52 // there was a security error. |
| 53 ERROR_PAGE, // We detected an error page. | |
|
fgorski
2017/04/10 21:19:17
ERROR_WRONG_PAGE_TYPE
(you mention that both error
chili
2017/04/11 20:40:16
Done.
| |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 // Describes the parameters to control how to create an archive. | 56 // Describes the parameters to control how to create an archive. |
| 56 struct CreateArchiveParams { | 57 struct CreateArchiveParams { |
| 57 CreateArchiveParams() : remove_popup_overlay(false) {} | 58 CreateArchiveParams() : remove_popup_overlay(false) {} |
| 58 | 59 |
| 59 // Whether to remove popup overlay that obstructs viewing normal content. | 60 // Whether to remove popup overlay that obstructs viewing normal content. |
| 60 bool remove_popup_overlay; | 61 bool remove_popup_overlay; |
| 61 }; | 62 }; |
| 62 | 63 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 74 // |create_archive_params|. Once archive is created |callback| will be called | 75 // |create_archive_params|. Once archive is created |callback| will be called |
| 75 // with the result and additional information. | 76 // with the result and additional information. |
| 76 virtual void CreateArchive(const base::FilePath& archives_dir, | 77 virtual void CreateArchive(const base::FilePath& archives_dir, |
| 77 const CreateArchiveParams& create_archive_params, | 78 const CreateArchiveParams& create_archive_params, |
| 78 const CreateArchiveCallback& callback) = 0; | 79 const CreateArchiveCallback& callback) = 0; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace offline_pages | 82 } // namespace offline_pages |
| 82 | 83 |
| 83 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ | 84 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ |
| OLD | NEW |