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

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

Issue 1901363002: Don't stop ServiceWorker when DevTools is attached even if JS execution is failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add running_status check Created 4 years, 8 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_version.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_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 std::unique_ptr<net::HttpResponseInfo> main_script_http_info_; 662 std::unique_ptr<net::HttpResponseInfo> main_script_http_info_;
663 663
664 // If not OK, the reason that StartWorker failed. Used for 664 // If not OK, the reason that StartWorker failed. Used for
665 // running |start_callbacks_|. 665 // running |start_callbacks_|.
666 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; 666 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK;
667 667
668 std::unique_ptr<PingController> ping_controller_; 668 std::unique_ptr<PingController> ping_controller_;
669 std::unique_ptr<Metrics> metrics_; 669 std::unique_ptr<Metrics> metrics_;
670 const bool should_exclude_from_uma_ = false; 670 const bool should_exclude_from_uma_ = false;
671 671
672 bool stop_when_devtools_detached_ = false;
673
672 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 674 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
673 675
674 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 676 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
675 }; 677 };
676 678
677 template <typename Interface> 679 template <typename Interface>
678 base::WeakPtr<Interface> ServiceWorkerVersion::GetMojoServiceForRequest( 680 base::WeakPtr<Interface> ServiceWorkerVersion::GetMojoServiceForRequest(
679 int request_id) { 681 int request_id) {
680 DCHECK_EQ(RUNNING, running_status()); 682 DCHECK_EQ(RUNNING, running_status());
681 PendingRequest<StatusCallback>* request = custom_requests_.Lookup(request_id); 683 PendingRequest<StatusCallback>* request = custom_requests_.Lookup(request_id);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 750
749 // At this point |this| can have been deleted, so don't do anything other 751 // At this point |this| can have been deleted, so don't do anything other
750 // than returning. 752 // than returning.
751 753
752 return true; 754 return true;
753 } 755 }
754 756
755 } // namespace content 757 } // namespace content
756 758
757 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 759 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698