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

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 875573002: Service Worker: Expose Get/Store/ClearUserData to content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@publicrouter
Patch Set: Remove unnecessary PostTasks Created 5 years, 11 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/service_worker/service_worker_context_wrapper.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 ServiceWorkerProcessManager* process_manager() { 72 ServiceWorkerProcessManager* process_manager() {
73 return process_manager_.get(); 73 return process_manager_.get();
74 } 74 }
75 75
76 // ServiceWorkerContext implementation: 76 // ServiceWorkerContext implementation:
77 void RegisterServiceWorker(const GURL& pattern, 77 void RegisterServiceWorker(const GURL& pattern,
78 const GURL& script_url, 78 const GURL& script_url,
79 const ResultCallback& continuation) override; 79 const ResultCallback& continuation) override;
80 void UnregisterServiceWorker(const GURL& pattern, 80 void UnregisterServiceWorker(const GURL& pattern,
81 const ResultCallback& continuation) override; 81 const ResultCallback& continuation) override;
82 void GetUserData(int64 registration_id,
83 const std::string& key,
84 const GetUserDataCallback& callback) override;
85 void StoreUserData(int64 registration_id,
86 const GURL& origin,
87 const std::string& key,
88 const std::string& data,
89 const ResultCallback& callback) override;
90 void ClearUserData(int64 registration_id,
91 const std::string& key,
92 const ResultCallback& callback) override;
82 void CanHandleMainResourceOffline( 93 void CanHandleMainResourceOffline(
83 const GURL& url, 94 const GURL& url,
84 const GURL& first_party, 95 const GURL& first_party,
85 const net::CompletionCallback& callback) override; 96 const net::CompletionCallback& callback) override;
86 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; 97 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override;
87 void DeleteForOrigin(const GURL& origin_url) override; 98 void DeleteForOrigin(const GURL& origin_url) override;
88 99
89 // DeleteForOrigin with completion callback. Does not exit early, and returns 100 // DeleteForOrigin with completion callback. Does not exit early, and returns
90 // false if one or more of the deletions fail. 101 // false if one or more of the deletions fail.
91 virtual void DeleteForOrigin(const GURL& origin_url, 102 virtual void DeleteForOrigin(const GURL& origin_url,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Initialized in Init(); true if the user data directory is empty. 149 // Initialized in Init(); true if the user data directory is empty.
139 bool is_incognito_; 150 bool is_incognito_;
140 151
141 // Raw pointer to the StoragePartitionImpl owning |this|. 152 // Raw pointer to the StoragePartitionImpl owning |this|.
142 StoragePartitionImpl* storage_partition_; 153 StoragePartitionImpl* storage_partition_;
143 }; 154 };
144 155
145 } // namespace content 156 } // namespace content
146 157
147 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698