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

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

Issue 2880963005: MHTMLGenerationManager - add param (Closed)
Patch Set: Merged with tip of tree Created 3 years, 7 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 53 ERROR_ERROR_PAGE, // We detected an error page.
54 ERROR_INTERSTITIAL_PAGE, // We detected an interstitial page. 54 ERROR_INTERSTITIAL_PAGE, // We detected an interstitial page.
55 }; 55 };
56 56
57 // Describes the parameters to control how to create an archive. 57 // Describes the parameters to control how to create an archive.
58 struct CreateArchiveParams { 58 struct CreateArchiveParams {
59 CreateArchiveParams() : remove_popup_overlay(false) {} 59 CreateArchiveParams()
60 : remove_popup_overlay(false), use_page_problem_detectors(false) {}
60 61
61 // Whether to remove popup overlay that obstructs viewing normal content. 62 // Whether to remove popup overlay that obstructs viewing normal content.
62 bool remove_popup_overlay; 63 bool remove_popup_overlay;
64
65 // Run page problem detectors while generating MTHML if true.
66 bool use_page_problem_detectors;
63 }; 67 };
64 68
65 typedef base::Callback<void(OfflinePageArchiver* /* archiver */, 69 typedef base::Callback<void(OfflinePageArchiver* /* archiver */,
66 ArchiverResult /* result */, 70 ArchiverResult /* result */,
67 const GURL& /* url */, 71 const GURL& /* url */,
68 const base::FilePath& /* file_path */, 72 const base::FilePath& /* file_path */,
69 const base::string16& /* title */, 73 const base::string16& /* title */,
70 int64_t /* file_size */)> 74 int64_t /* file_size */)>
71 CreateArchiveCallback; 75 CreateArchiveCallback;
72 76
73 virtual ~OfflinePageArchiver() {} 77 virtual ~OfflinePageArchiver() {}
74 78
75 // Starts creating the archive in the |archives_dir| per 79 // Starts creating the archive in the |archives_dir| per
76 // |create_archive_params|. Once archive is created |callback| will be called 80 // |create_archive_params|. Once archive is created |callback| will be called
77 // with the result and additional information. 81 // with the result and additional information.
78 virtual void CreateArchive(const base::FilePath& archives_dir, 82 virtual void CreateArchive(const base::FilePath& archives_dir,
79 const CreateArchiveParams& create_archive_params, 83 const CreateArchiveParams& create_archive_params,
80 const CreateArchiveCallback& callback) = 0; 84 const CreateArchiveCallback& callback) = 0;
81 }; 85 };
82 86
83 } // namespace offline_pages 87 } // namespace offline_pages
84 88
85 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ 89 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/offline_pages/background_loader_offliner.cc ('k') | components/offline_pages/core/offline_page_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698