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

Unified Diff: content/browser/background_fetch/background_fetch_data_manager.h

Issue 2770393003: Add a type to uniquely identify a Background Fetch (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/background_fetch/background_fetch_data_manager.h
diff --git a/content/browser/background_fetch/background_fetch_data_manager.h b/content/browser/background_fetch/background_fetch_data_manager.h
index 4dd3a86873f71fe89f8c0c514637444bd457981b..a093da2dbfbe97fe8829e894b0eb7f5814a25c7f 100644
--- a/content/browser/background_fetch/background_fetch_data_manager.h
+++ b/content/browser/background_fetch/background_fetch_data_manager.h
@@ -5,14 +5,15 @@
#ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
#define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DATA_MANAGER_H_
-#include <map>
#include <memory>
+#include <set>
#include <string>
#include <unordered_map>
#include "base/macros.h"
#include "content/browser/background_fetch/background_fetch_job_data.h"
#include "content/browser/background_fetch/background_fetch_job_info.h"
+#include "content/browser/background_fetch/background_fetch_registration_id.h"
#include "content/common/content_export.h"
#include "url/origin.h"
@@ -47,9 +48,8 @@ class CONTENT_EXPORT BackgroundFetchDataManager {
// DataManager is guaranteed to be destructed before the Context.
BackgroundFetchContext* background_fetch_context_;
- // Map from <sw_registration_id, tag> to the job_guid for that tag.
- using JobIdentifier = std::pair<int64_t, std::string>;
- std::map<JobIdentifier, std::string> service_worker_tag_map_;
+ // Set of known background fetch registration ids.
+ std::set<BackgroundFetchRegistrationId> known_registrations_;
// Temporary map to hold data which will be written to storage.
// Map from job_guid to JobInfo.

Powered by Google App Engine
This is Rietveld 408576698