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

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

Issue 2365053002: Notify ServiceWorkerContextWatcher about routing ids of ServiceWorkerVersion and their updates. (Closed)
Patch Set: rebase, rename Created 4 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
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/embedded_worker_instance.h" 5 #include "content/browser/service_worker/embedded_worker_instance.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 if (worker_devtools_agent_route_id != MSG_ROUTING_NONE) { 556 if (worker_devtools_agent_route_id != MSG_ROUTING_NONE) {
557 DCHECK(!devtools_proxy_); 557 DCHECK(!devtools_proxy_);
558 devtools_proxy_.reset( 558 devtools_proxy_.reset(
559 new DevToolsProxy(process_id(), worker_devtools_agent_route_id)); 559 new DevToolsProxy(process_id(), worker_devtools_agent_route_id));
560 } 560 }
561 if (wait_for_debugger) { 561 if (wait_for_debugger) {
562 // We don't measure the start time when wait_for_debugger flag is set. So 562 // We don't measure the start time when wait_for_debugger flag is set. So
563 // we set the NULL time here. 563 // we set the NULL time here.
564 step_time_ = base::TimeTicks(); 564 step_time_ = base::TimeTicks();
565 } 565 }
566 FOR_EACH_OBSERVER(Listener, listener_list_, OnRegisteredToDevToolsManager());
566 } 567 }
567 568
568 void EmbeddedWorkerInstance::OnStartWorkerMessageSent() { 569 void EmbeddedWorkerInstance::OnStartWorkerMessageSent() {
569 if (!step_time_.is_null()) { 570 if (!step_time_.is_null()) {
570 base::TimeDelta duration = UpdateStepTime(); 571 base::TimeDelta duration = UpdateStepTime();
571 if (inflight_start_task_->is_installed()) { 572 if (inflight_start_task_->is_installed()) {
572 ServiceWorkerMetrics::RecordTimeToSendStartWorker(duration, 573 ServiceWorkerMetrics::RecordTimeToSendStartWorker(duration,
573 start_situation_); 574 start_situation_);
574 } 575 }
575 } 576 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 case SCRIPT_READ_FINISHED: 886 case SCRIPT_READ_FINISHED:
886 return "Script read finished"; 887 return "Script read finished";
887 case STARTING_PHASE_MAX_VALUE: 888 case STARTING_PHASE_MAX_VALUE:
888 NOTREACHED(); 889 NOTREACHED();
889 } 890 }
890 NOTREACHED() << phase; 891 NOTREACHED() << phase;
891 return std::string(); 892 return std::string();
892 } 893 }
893 894
894 } // namespace content 895 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698