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

Unified Diff: components/offline_pages/offline_page_test_archiver.h

Issue 1521193002: [Offline pages] Refactor URL conversions from TabAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing final CR feedback Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/offline_pages/offline_page_test_archiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_test_archiver.h
diff --git a/components/offline_pages/offline_page_test_archiver.h b/components/offline_pages/offline_page_test_archiver.h
index 7375c1868d23cf497f1984eab9eae73946fb6a0a..a8a93830a8d27d3ab862f55482f38808125452ee 100644
--- a/components/offline_pages/offline_page_test_archiver.h
+++ b/components/offline_pages/offline_page_test_archiver.h
@@ -22,6 +22,8 @@ namespace offline_pages {
// for an actual web contents.
class OfflinePageTestArchiver : public OfflinePageArchiver {
public:
+ // TODO(fgorski): Try refactoring the observer out and replace it with a
+ // callback, or completely remove the call to |SetLastPathCreatedByArchiver|.
class Observer {
public:
virtual ~Observer() {}
@@ -47,8 +49,13 @@ class OfflinePageTestArchiver : public OfflinePageArchiver {
// When set to true, |CompleteCreateArchive| should be called explicitly for
// the process to finish.
+ // TODO(fgorski): See if we can move this to the constructor.
void set_delayed(bool delayed) { delayed_ = delayed; }
+ // Allows to explicitly specify a file name for the tests.
+ // TODO(fgorski): See if we can move this to the constructor.
+ void set_filename(const base::FilePath& filename) { filename_ = filename; }
+
bool create_archive_called() const { return create_archive_called_; }
private:
@@ -56,6 +63,7 @@ class OfflinePageTestArchiver : public OfflinePageArchiver {
Observer* observer_;
GURL url_;
base::FilePath archives_dir_;
+ base::FilePath filename_;
ArchiverResult result_;
int64 size_to_report_;
bool create_archive_called_;
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/offline_pages/offline_page_test_archiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698