| 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_ERROR_PAGE, // We detected an error page. |
| 54 ERROR_INTERSTITIAL_PAGE, // We detected an interstitial page. |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 // Describes the parameters to control how to create an archive. | 57 // Describes the parameters to control how to create an archive. |
| 56 struct CreateArchiveParams { | 58 struct CreateArchiveParams { |
| 57 CreateArchiveParams() : remove_popup_overlay(false) {} | 59 CreateArchiveParams() : remove_popup_overlay(false) {} |
| 58 | 60 |
| 59 // Whether to remove popup overlay that obstructs viewing normal content. | 61 // Whether to remove popup overlay that obstructs viewing normal content. |
| 60 bool remove_popup_overlay; | 62 bool remove_popup_overlay; |
| 61 }; | 63 }; |
| 62 | 64 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 74 // |create_archive_params|. Once archive is created |callback| will be called | 76 // |create_archive_params|. Once archive is created |callback| will be called |
| 75 // with the result and additional information. | 77 // with the result and additional information. |
| 76 virtual void CreateArchive(const base::FilePath& archives_dir, | 78 virtual void CreateArchive(const base::FilePath& archives_dir, |
| 77 const CreateArchiveParams& create_archive_params, | 79 const CreateArchiveParams& create_archive_params, |
| 78 const CreateArchiveCallback& callback) = 0; | 80 const CreateArchiveCallback& callback) = 0; |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace offline_pages | 83 } // namespace offline_pages |
| 82 | 84 |
| 83 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ | 85 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ |
| OLD | NEW |