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

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 feedback, updating tests, moving functions to a static class 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
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..92267b1dc1c136f3ecdfa8071dcc39d5dbe871c0 100644
--- a/components/offline_pages/offline_page_test_archiver.h
+++ b/components/offline_pages/offline_page_test_archiver.h
@@ -49,6 +49,11 @@ class OfflinePageTestArchiver : public OfflinePageArchiver {
// the process to finish.
void set_delayed(bool delayed) { delayed_ = delayed; }
+ // Allows to explicitly specify a file name for the tests.
+ void set_file_name(const base::FilePath& file_name) {
dewittj 2015/12/16 22:20:16 I think that this be SetFileNameForTest instead.
jianli 2015/12/16 23:08:08 Why not just passing in the constructor?
fgorski 2015/12/17 19:00:14 This is a test helper class so we don't need to ad
+ file_name_ = file_name;
+ }
+
bool create_archive_called() const { return create_archive_called_; }
private:
@@ -56,6 +61,7 @@ class OfflinePageTestArchiver : public OfflinePageArchiver {
Observer* observer_;
GURL url_;
base::FilePath archives_dir_;
+ base::FilePath file_name_;
jianli 2015/12/16 23:08:08 nit: we tend to use filename
fgorski 2015/12/17 19:00:14 Done.
ArchiverResult result_;
int64 size_to_report_;
bool create_archive_called_;

Powered by Google App Engine
This is Rietveld 408576698