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

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

Issue 1923143005: service worker: Bump update time even when the script was identical (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 7 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_job_unittest.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 #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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 void EmbeddedWorkerInstance::OnScriptReadStarted() { 502 void EmbeddedWorkerInstance::OnScriptReadStarted() {
503 starting_phase_ = SCRIPT_READ_STARTED; 503 starting_phase_ = SCRIPT_READ_STARTED;
504 } 504 }
505 505
506 void EmbeddedWorkerInstance::OnScriptReadFinished() { 506 void EmbeddedWorkerInstance::OnScriptReadFinished() {
507 starting_phase_ = SCRIPT_READ_FINISHED; 507 starting_phase_ = SCRIPT_READ_FINISHED;
508 } 508 }
509 509
510 void EmbeddedWorkerInstance::OnScriptLoaded() { 510 void EmbeddedWorkerInstance::OnScriptLoaded() {
511 starting_phase_ = SCRIPT_LOADED;
511 FOR_EACH_OBSERVER(Listener, listener_list_, OnScriptLoaded()); 512 FOR_EACH_OBSERVER(Listener, listener_list_, OnScriptLoaded());
512 starting_phase_ = SCRIPT_LOADED; 513 // |this| may be destroyed by the callback.
513 } 514 }
514 515
515 void EmbeddedWorkerInstance::OnThreadStarted(int thread_id) { 516 void EmbeddedWorkerInstance::OnThreadStarted(int thread_id) {
516 starting_phase_ = THREAD_STARTED; 517 starting_phase_ = THREAD_STARTED;
517 if (!start_timing_.is_null()) { 518 if (!start_timing_.is_null()) {
518 if (network_accessed_for_script_) { 519 if (network_accessed_for_script_) {
519 UMA_HISTOGRAM_TIMES("EmbeddedWorkerInstance.ScriptLoadWithNetworkAccess", 520 UMA_HISTOGRAM_TIMES("EmbeddedWorkerInstance.ScriptLoadWithNetworkAccess",
520 base::TimeTicks::Now() - start_timing_); 521 base::TimeTicks::Now() - start_timing_);
521 } else { 522 } else {
522 UMA_HISTOGRAM_TIMES( 523 UMA_HISTOGRAM_TIMES(
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 case SCRIPT_READ_FINISHED: 723 case SCRIPT_READ_FINISHED:
723 return "Script read finished"; 724 return "Script read finished";
724 case STARTING_PHASE_MAX_VALUE: 725 case STARTING_PHASE_MAX_VALUE:
725 NOTREACHED(); 726 NOTREACHED();
726 } 727 }
727 NOTREACHED() << phase; 728 NOTREACHED() << phase;
728 return std::string(); 729 return std::string();
729 } 730 }
730 731
731 } // namespace content 732 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698