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

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

Issue 1843893002: Support resaving offline page right after it is being deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 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_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 26 matching lines...) Expand all
37 OfflinePageTestArchiver( 37 OfflinePageTestArchiver(
38 Observer* observer, 38 Observer* observer,
39 const GURL& url, 39 const GURL& url,
40 ArchiverResult result, 40 ArchiverResult result,
41 int64_t size_to_report, 41 int64_t size_to_report,
42 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 42 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
43 ~OfflinePageTestArchiver() override; 43 ~OfflinePageTestArchiver() override;
44 44
45 // OfflinePageArchiver implementation: 45 // OfflinePageArchiver implementation:
46 void CreateArchive(const base::FilePath& archives_dir, 46 void CreateArchive(const base::FilePath& archives_dir,
47 int64_t archive_id,
47 const CreateArchiveCallback& callback) override; 48 const CreateArchiveCallback& callback) override;
48 49
49 // Completes the creation of archive. Should be used with |set_delayed| set to 50 // Completes the creation of archive. Should be used with |set_delayed| set to
50 // ture. 51 // ture.
51 void CompleteCreateArchive(); 52 void CompleteCreateArchive();
52 53
53 // When set to true, |CompleteCreateArchive| should be called explicitly for 54 // When set to true, |CompleteCreateArchive| should be called explicitly for
54 // the process to finish. 55 // the process to finish.
55 // TODO(fgorski): See if we can move this to the constructor. 56 // TODO(fgorski): See if we can move this to the constructor.
56 void set_delayed(bool delayed) { delayed_ = delayed; } 57 void set_delayed(bool delayed) { delayed_ = delayed; }
(...skipping 16 matching lines...) Expand all
73 bool delayed_; 74 bool delayed_;
74 CreateArchiveCallback callback_; 75 CreateArchiveCallback callback_;
75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 76 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver); 78 DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver);
78 }; 79 };
79 80
80 } // namespace offline_pages 81 } // namespace offline_pages
81 82
82 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ 83 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_model_unittest.cc ('k') | components/offline_pages/offline_page_test_archiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698