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

Side by Side Diff: components/offline_pages/offline_page_test_archiver.h

Issue 2542833003: Failed offline snapshots won't erase a successful one from the same page load. (Closed)
Patch Set: Fix link error and address reviewer comments. Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_OFFLINE_PAGE_TEST_ARCHIVER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int64_t size_to_report, 43 int64_t size_to_report,
44 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 44 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
45 ~OfflinePageTestArchiver() override; 45 ~OfflinePageTestArchiver() override;
46 46
47 // OfflinePageArchiver implementation: 47 // OfflinePageArchiver implementation:
48 void CreateArchive(const base::FilePath& archives_dir, 48 void CreateArchive(const base::FilePath& archives_dir,
49 int64_t archive_id, 49 int64_t archive_id,
50 const CreateArchiveCallback& callback) override; 50 const CreateArchiveCallback& callback) override;
51 51
52 // Completes the creation of archive. Should be used with |set_delayed| set to 52 // Completes the creation of archive. Should be used with |set_delayed| set to
53 // ture. 53 // true.
54 void CompleteCreateArchive(); 54 void CompleteCreateArchive();
55 55
56 // When set to true, |CompleteCreateArchive| should be called explicitly for 56 // When set to true, |CompleteCreateArchive| should be called explicitly for
57 // the process to finish. 57 // the process to finish.
58 // TODO(fgorski): See if we can move this to the constructor. 58 // TODO(fgorski): See if we can move this to the constructor.
59 void set_delayed(bool delayed) { delayed_ = delayed; } 59 void set_delayed(bool delayed) { delayed_ = delayed; }
60 60
61 // Allows to explicitly specify a file name for the tests. 61 // Allows to explicitly specify a file name for the tests.
62 // TODO(fgorski): See if we can move this to the constructor. 62 // TODO(fgorski): See if we can move this to the constructor.
63 void set_filename(const base::FilePath& filename) { filename_ = filename; } 63 void set_filename(const base::FilePath& filename) { filename_ = filename; }
(...skipping 13 matching lines...) Expand all
77 base::string16 result_title_; 77 base::string16 result_title_;
78 CreateArchiveCallback callback_; 78 CreateArchiveCallback callback_;
79 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 79 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver); 81 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver);
82 }; 82 };
83 83
84 } // namespace offline_pages 84 } // namespace offline_pages
85 85
86 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ 86 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698