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

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

Issue 1166433003: Service Worker: Don't write to disk during update until proven necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 6 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 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 ServiceWorkerRegistration* MatchRegistration() const; 221 ServiceWorkerRegistration* MatchRegistration() const;
222 222
223 // Called when our controller has been terminated and doomed due to an 223 // Called when our controller has been terminated and doomed due to an
224 // exceptional condition like it could no longer be read from the script 224 // exceptional condition like it could no longer be read from the script
225 // cache. 225 // cache.
226 void NotifyControllerLost(); 226 void NotifyControllerLost();
227 227
228 private: 228 private:
229 friend class ServiceWorkerProviderHostTest; 229 friend class ServiceWorkerProviderHostTest;
230 friend class ServiceWorkerWriteToCacheJobTest; 230 friend class ServiceWorkerWriteToCacheJobTest;
231 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript);
232 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
233 Update_SameSizeScript);
234 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
235 Update_TruncatedScript);
236 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
237 Update_ElongatedScript);
238 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest,
239 Update_EmptyScript);
231 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, 240 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest,
232 UpdateBefore24Hours); 241 UpdateBefore24Hours);
233 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, 242 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest,
234 UpdateAfter24Hours); 243 UpdateAfter24Hours);
235 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, 244 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest,
236 UpdateForceBypassCache); 245 UpdateForceBypassCache);
237 246
238 struct OneShotGetReadyCallback { 247 struct OneShotGetReadyCallback {
239 GetRegistrationForReadyCallback callback; 248 GetRegistrationForReadyCallback callback;
240 bool called; 249 bool called;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 bool allow_association_; 307 bool allow_association_;
299 308
300 std::vector<base::Closure> queued_events_; 309 std::vector<base::Closure> queued_events_;
301 310
302 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 311 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
303 }; 312 };
304 313
305 } // namespace content 314 } // namespace content
306 315
307 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 316 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698