Index: content/browser/service_worker/service_worker_database.h |
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h |
index 0ef955d0d4efdcf57e25c67ac4f076dc1d510acd..8c5dbcf43dfb4c9ce06586dce011c9349ff98752 100644 |
--- a/content/browser/service_worker/service_worker_database.h |
+++ b/content/browser/service_worker/service_worker_database.h |
@@ -7,10 +7,10 @@ |
#include <stdint.h> |
-#include <map> |
#include <memory> |
#include <set> |
#include <string> |
+#include <utility> |
#include <vector> |
#include "base/files/file_path.h" |
@@ -172,24 +172,24 @@ class CONTENT_EXPORT ServiceWorkerDatabase { |
RegistrationData* deleted_version, |
std::vector<int64_t>* newly_purgeable_resources); |
- // Reads user data for |registration_id| and |user_data_name| from the |
+ // Reads user data for |registration_id| and |user_data_names| from the |
// database. |
michaeln
2016/05/03 19:38:05
also document that the function returns OK only if
johnme
2016/05/05 10:54:04
Done.
|
Status ReadUserData(int64_t registration_id, |
- const std::string& user_data_name, |
- std::string* user_data); |
- |
- // Writes |user_data| into the database. Returns NOT_FOUND if the registration |
- // specified by |registration_id| does not exist in the database. |
- Status WriteUserData(int64_t registration_id, |
- const GURL& origin, |
- const std::string& user_data_name, |
- const std::string& user_data); |
- |
- // Deletes user data for |registration_id| and |user_data_name| from the |
- // database. Returns OK if it's successfully deleted or not found in the |
+ const std::vector<std::string>& user_data_names, |
+ std::vector<std::string>* user_data_values); |
+ |
+ // Writes |name_value_pairs| into the database. Returns NOT_FOUND if the |
+ // registration specified by |registration_id| does not exist in the database. |
+ Status WriteUserData( |
+ int64_t registration_id, |
+ const GURL& origin, |
+ const std::vector<std::pair<std::string, std::string>>& name_value_pairs); |
+ |
+ // Deletes user data for |registration_id| and |user_data_names| from the |
+ // database. Returns OK if all are successfully deleted or not found in the |
// database. |
Status DeleteUserData(int64_t registration_id, |
- const std::string& user_data_name); |
+ const std::vector<std::string>& user_data_names); |
// Reads user data for all registrations that have data with |user_data_name| |
// from the database. Returns OK if they are successfully read or not found. |