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

Side by Side Diff: content/browser/service_worker/service_worker_version.cc

Issue 2451373003: service worker: Implement NavigationPreloadManager.setHeaderValue (Closed)
Patch Set: rebase Created 4 years, 1 month 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 #include "content/browser/service_worker/service_worker_version.h" 5 #include "content/browser/service_worker/service_worker_version.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if (context_) 339 if (context_)
340 context_->RemoveLiveVersion(version_id_); 340 context_->RemoveLiveVersion(version_id_);
341 341
342 if (running_status() == EmbeddedWorkerStatus::STARTING || 342 if (running_status() == EmbeddedWorkerStatus::STARTING ||
343 running_status() == EmbeddedWorkerStatus::RUNNING) { 343 running_status() == EmbeddedWorkerStatus::RUNNING) {
344 embedded_worker_->Stop(); 344 embedded_worker_->Stop();
345 } 345 }
346 embedded_worker_->RemoveListener(this); 346 embedded_worker_->RemoveListener(this);
347 } 347 }
348 348
349 void ServiceWorkerVersion::SetNavigationPreloadState(
350 const NavigationPreloadState& state) {
351 navigation_preload_state_ = state;
352 }
353
349 void ServiceWorkerVersion::SetStatus(Status status) { 354 void ServiceWorkerVersion::SetStatus(Status status) {
350 if (status_ == status) 355 if (status_ == status)
351 return; 356 return;
352 357
353 TRACE_EVENT2("ServiceWorker", "ServiceWorkerVersion::SetStatus", "Script URL", 358 TRACE_EVENT2("ServiceWorker", "ServiceWorkerVersion::SetStatus", "Script URL",
354 script_url_.spec(), "New Status", VersionStatusToString(status)); 359 script_url_.spec(), "New Status", VersionStatusToString(status));
355 360
356 // |fetch_handler_existence_| must be set before setting the status to 361 // |fetch_handler_existence_| must be set before setting the status to
357 // INSTALLED, 362 // INSTALLED,
358 // ACTIVATING or ACTIVATED. 363 // ACTIVATING or ACTIVATED.
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 1878
1874 void ServiceWorkerVersion::CleanUpExternalRequest( 1879 void ServiceWorkerVersion::CleanUpExternalRequest(
1875 const std::string& request_uuid, 1880 const std::string& request_uuid,
1876 ServiceWorkerStatusCode status) { 1881 ServiceWorkerStatusCode status) {
1877 if (status == SERVICE_WORKER_OK) 1882 if (status == SERVICE_WORKER_OK)
1878 return; 1883 return;
1879 external_request_uuid_to_request_id_.erase(request_uuid); 1884 external_request_uuid_to_request_id_.erase(request_uuid);
1880 } 1885 }
1881 1886
1882 } // namespace content 1887 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | content/child/service_worker/service_worker_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698