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

Side by Side Diff: content/browser/background_fetch/background_fetch_embedded_worker_test_helper.h

Issue 2824193002: Enable use_once_callback for //content/common/*.mojom (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « no previous file | content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TEST_H ELPER_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TEST_H ELPER_H_
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TEST_H ELPER_H_ 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TEST_H ELPER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 const base::Optional<std::vector<BackgroundFetchSettledFetch>> last_fetches() 57 const base::Optional<std::vector<BackgroundFetchSettledFetch>> last_fetches()
58 const { 58 const {
59 return last_fetches_; 59 return last_fetches_;
60 } 60 }
61 61
62 protected: 62 protected:
63 // EmbeddedWorkerTestHelper overrides: 63 // EmbeddedWorkerTestHelper overrides:
64 void OnBackgroundFetchAbortEvent( 64 void OnBackgroundFetchAbortEvent(
65 const std::string& tag, 65 const std::string& tag,
66 const mojom::ServiceWorkerEventDispatcher:: 66 mojom::ServiceWorkerEventDispatcher::
67 DispatchBackgroundFetchAbortEventCallback& callback) override; 67 DispatchBackgroundFetchAbortEventCallback callback) override;
68 void OnBackgroundFetchClickEvent( 68 void OnBackgroundFetchClickEvent(
69 const std::string& tag, 69 const std::string& tag,
70 mojom::BackgroundFetchState state, 70 mojom::BackgroundFetchState state,
71 const mojom::ServiceWorkerEventDispatcher:: 71 mojom::ServiceWorkerEventDispatcher::
72 DispatchBackgroundFetchClickEventCallback& callback) override; 72 DispatchBackgroundFetchClickEventCallback callback) override;
73 void OnBackgroundFetchFailEvent( 73 void OnBackgroundFetchFailEvent(
74 const std::string& tag, 74 const std::string& tag,
75 const std::vector<BackgroundFetchSettledFetch>& fetches, 75 const std::vector<BackgroundFetchSettledFetch>& fetches,
76 const mojom::ServiceWorkerEventDispatcher:: 76 mojom::ServiceWorkerEventDispatcher::
77 DispatchBackgroundFetchFailEventCallback& callback) override; 77 DispatchBackgroundFetchFailEventCallback callback) override;
78 void OnBackgroundFetchedEvent( 78 void OnBackgroundFetchedEvent(
79 const std::string& tag, 79 const std::string& tag,
80 const std::vector<BackgroundFetchSettledFetch>& fetches, 80 const std::vector<BackgroundFetchSettledFetch>& fetches,
81 const mojom::ServiceWorkerEventDispatcher:: 81 mojom::ServiceWorkerEventDispatcher::
82 DispatchBackgroundFetchedEventCallback& callback) override; 82 DispatchBackgroundFetchedEventCallback callback) override;
83 83
84 private: 84 private:
85 bool fail_abort_event_ = false; 85 bool fail_abort_event_ = false;
86 bool fail_click_event_ = false; 86 bool fail_click_event_ = false;
87 bool fail_fetch_fail_event_ = false; 87 bool fail_fetch_fail_event_ = false;
88 bool fail_fetched_event_ = false; 88 bool fail_fetched_event_ = false;
89 89
90 base::Closure abort_event_closure_; 90 base::Closure abort_event_closure_;
91 base::Closure click_event_closure_; 91 base::Closure click_event_closure_;
92 base::Closure fetch_fail_event_closure_; 92 base::Closure fetch_fail_event_closure_;
93 base::Closure fetched_event_closure_; 93 base::Closure fetched_event_closure_;
94 94
95 base::Optional<std::string> last_tag_; 95 base::Optional<std::string> last_tag_;
96 base::Optional<mojom::BackgroundFetchState> last_state_; 96 base::Optional<mojom::BackgroundFetchState> last_state_;
97 base::Optional<std::vector<BackgroundFetchSettledFetch>> last_fetches_; 97 base::Optional<std::vector<BackgroundFetchSettledFetch>> last_fetches_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchEmbeddedWorkerTestHelper); 99 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchEmbeddedWorkerTestHelper);
100 }; 100 };
101 101
102 } // namespace content 102 } // namespace content
103 103
104 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TES T_HELPER_H_ 104 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_EMBEDDED_WORKER_TES T_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698