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

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

Issue 2973233002: [Background Fetch] Cleanup/fix thread safety (Closed)
Patch Set: Created 3 years, 5 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>
11 #include <unordered_map> 11 #include <unordered_map>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/optional.h" 15 #include "base/optional.h"
16 #include "base/sequence_checker.h"
16 #include "content/browser/background_fetch/background_fetch_registration_id.h" 17 #include "content/browser/background_fetch/background_fetch_registration_id.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "third_party/WebKit/public/platform/modules/background_fetch/background _fetch.mojom.h" 19 #include "third_party/WebKit/public/platform/modules/background_fetch/background _fetch.mojom.h"
19 #include "url/origin.h" 20 #include "url/origin.h"
20 21
21 namespace content { 22 namespace content {
22 23
23 class BackgroundFetchRequestInfo; 24 class BackgroundFetchRequestInfo;
24 struct BackgroundFetchSettledFetch; 25 struct BackgroundFetchSettledFetch;
25 class BlobHandle; 26 class BlobHandle;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 class RegistrationData; 91 class RegistrationData;
91 92
92 // The blob storage request with which response information will be stored. 93 // The blob storage request with which response information will be stored.
93 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 94 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
94 95
95 // Map of known background fetch registration ids to their associated data. 96 // Map of known background fetch registration ids to their associated data.
96 std::map<BackgroundFetchRegistrationId, std::unique_ptr<RegistrationData>> 97 std::map<BackgroundFetchRegistrationId, std::unique_ptr<RegistrationData>>
97 registrations_; 98 registrations_;
98 99
100 SEQUENCE_CHECKER(sequence_checker_);
101
99 base::WeakPtrFactory<BackgroundFetchDataManager> weak_ptr_factory_; 102 base::WeakPtrFactory<BackgroundFetchDataManager> weak_ptr_factory_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchDataManager); 104 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchDataManager);
102 }; 105 };
103 106
104 } // namespace content 107 } // namespace content
105 108
106 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_ 109 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698