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

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

Issue 2816403004: Fire the `backgroundfetchfail` event for failed fetches (Closed)
Patch Set: 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
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_DATA_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_ 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 using CreateRegistrationCallback = base::OnceCallback<void( 35 using CreateRegistrationCallback = base::OnceCallback<void(
36 blink::mojom::BackgroundFetchError, 36 blink::mojom::BackgroundFetchError,
37 std::vector<scoped_refptr<BackgroundFetchRequestInfo>>)>; 37 std::vector<scoped_refptr<BackgroundFetchRequestInfo>>)>;
38 using DeleteRegistrationCallback = 38 using DeleteRegistrationCallback =
39 base::OnceCallback<void(blink::mojom::BackgroundFetchError)>; 39 base::OnceCallback<void(blink::mojom::BackgroundFetchError)>;
40 using NextRequestCallback = 40 using NextRequestCallback =
41 base::OnceCallback<void(scoped_refptr<BackgroundFetchRequestInfo>)>; 41 base::OnceCallback<void(scoped_refptr<BackgroundFetchRequestInfo>)>;
42 using SettledFetchesCallback = 42 using SettledFetchesCallback =
43 base::OnceCallback<void(blink::mojom::BackgroundFetchError, 43 base::OnceCallback<void(blink::mojom::BackgroundFetchError,
44 bool /* background_fetch_succeeded */,
44 std::vector<BackgroundFetchSettledFetch>, 45 std::vector<BackgroundFetchSettledFetch>,
45 std::vector<std::unique_ptr<BlobHandle>>)>; 46 std::vector<std::unique_ptr<BlobHandle>>)>;
46 47
47 explicit BackgroundFetchDataManager(BrowserContext* browser_context); 48 explicit BackgroundFetchDataManager(BrowserContext* browser_context);
48 ~BackgroundFetchDataManager(); 49 ~BackgroundFetchDataManager();
49 50
50 // Creates and stores a new registration with the given properties. Will 51 // Creates and stores a new registration with the given properties. Will
51 // invoke the |callback| when the registration has been created, which may 52 // invoke the |callback| when the registration has been created, which may
52 // fail due to invalid input or storage errors. 53 // fail due to invalid input or storage errors.
53 void CreateRegistration( 54 void CreateRegistration(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 registrations_; 97 registrations_;
97 98
98 base::WeakPtrFactory<BackgroundFetchDataManager> weak_ptr_factory_; 99 base::WeakPtrFactory<BackgroundFetchDataManager> weak_ptr_factory_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchDataManager); 101 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchDataManager);
101 }; 102 };
102 103
103 } // namespace content 104 } // namespace content
104 105
105 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_ 106 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698