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

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

Issue 660253004: [ServiceWorker] Add unittests for ServiceWorkerWriteToCacheJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated michaeln's comment Created 6 years, 2 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_storage.h » ('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_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Dispatches message event to the document. 126 // Dispatches message event to the document.
127 void PostMessage(const base::string16& message, 127 void PostMessage(const base::string16& message,
128 const std::vector<int>& sent_message_port_ids); 128 const std::vector<int>& sent_message_port_ids);
129 129
130 // Adds reference of this host's process to the |pattern|, the reference will 130 // Adds reference of this host's process to the |pattern|, the reference will
131 // be removed in destructor. 131 // be removed in destructor.
132 void AddScopedProcessReferenceToPattern(const GURL& pattern); 132 void AddScopedProcessReferenceToPattern(const GURL& pattern);
133 133
134 private: 134 private:
135 friend class ServiceWorkerProviderHostTest; 135 friend class ServiceWorkerProviderHostTest;
136 friend class ServiceWorkerWriteToCacheJobTest;
136 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, 137 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest,
137 UpdateBefore24Hours); 138 UpdateBefore24Hours);
138 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, 139 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest,
139 UpdateAfter24Hours); 140 UpdateAfter24Hours);
140 141
141 // ServiceWorkerRegistration::Listener overrides. 142 // ServiceWorkerRegistration::Listener overrides.
142 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; 143 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override;
143 144
144 // Sets the controller version field to |version| or if |version| is NULL, 145 // Sets the controller version field to |version| or if |version| is NULL,
145 // clears the field. 146 // clears the field.
(...skipping 21 matching lines...) Expand all
167 base::WeakPtr<ServiceWorkerContextCore> context_; 168 base::WeakPtr<ServiceWorkerContextCore> context_;
168 ServiceWorkerDispatcherHost* dispatcher_host_; 169 ServiceWorkerDispatcherHost* dispatcher_host_;
169 bool allow_association_; 170 bool allow_association_;
170 171
171 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 172 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
172 }; 173 };
173 174
174 } // namespace content 175 } // namespace content
175 176
176 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 177 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698