Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: components/offline_pages/core/offline_page_archiver.h

Issue 2810913002: [Offline pages] Add new Error page failure status inside the MHTML archiver and update correspondin… (Closed)
Patch Set: add comments and fix tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698