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

Side by Side Diff: content/browser/devtools/protocol/service_worker_handler.cc

Issue 2039743003: Introduce ServiceWorker.ActivatedWorkerPreparationForMainFrame.Time UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move GetWorkerPreparationSuffix Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/devtools/protocol/service_worker_handler.h" 5 #include "content/browser/devtools/protocol/service_worker_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 scoped_refptr<content::ServiceWorkerRegistration> protect, 57 scoped_refptr<content::ServiceWorkerRegistration> protect,
58 ServiceWorkerStatusCode status) { 58 ServiceWorkerStatusCode status) {
59 } 59 }
60 60
61 void PushDeliveryNoOp(PushDeliveryStatus status) { 61 void PushDeliveryNoOp(PushDeliveryStatus status) {
62 } 62 }
63 63
64 const std::string GetVersionRunningStatusString( 64 const std::string GetVersionRunningStatusString(
65 content::ServiceWorkerVersion::RunningStatus running_status) { 65 content::ServiceWorkerVersion::RunningStatus running_status) {
66 switch (running_status) { 66 switch (running_status) {
67 case content::ServiceWorkerVersion::STOPPED: 67 case content::ServiceWorkerVersion::RunningStatus::STOPPED:
68 return kServiceWorkerVersionRunningStatusStopped; 68 return kServiceWorkerVersionRunningStatusStopped;
69 case content::ServiceWorkerVersion::STARTING: 69 case content::ServiceWorkerVersion::RunningStatus::STARTING:
70 return kServiceWorkerVersionRunningStatusStarting; 70 return kServiceWorkerVersionRunningStatusStarting;
71 case content::ServiceWorkerVersion::RUNNING: 71 case content::ServiceWorkerVersion::RunningStatus::RUNNING:
72 return kServiceWorkerVersionRunningStatusRunning; 72 return kServiceWorkerVersionRunningStatusRunning;
73 case content::ServiceWorkerVersion::STOPPING: 73 case content::ServiceWorkerVersion::RunningStatus::STOPPING:
74 return kServiceWorkerVersionRunningStatusStopping; 74 return kServiceWorkerVersionRunningStatusStopping;
75 } 75 }
76 return std::string(); 76 return std::string();
77 } 77 }
78 78
79 const std::string GetVersionStatusString( 79 const std::string GetVersionStatusString(
80 content::ServiceWorkerVersion::Status status) { 80 content::ServiceWorkerVersion::Status status) {
81 switch (status) { 81 switch (status) {
82 case content::ServiceWorkerVersion::NEW: 82 case content::ServiceWorkerVersion::NEW:
83 return kServiceWorkerVersionStatusNew; 83 return kServiceWorkerVersionStatusNew;
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 691 }
692 692
693 void ServiceWorkerHandler::ClearForceUpdate() { 693 void ServiceWorkerHandler::ClearForceUpdate() {
694 if (context_) 694 if (context_)
695 context_->SetForceUpdateOnPageLoad(false); 695 context_->SetForceUpdateOnPageLoad(false);
696 } 696 }
697 697
698 } // namespace service_worker 698 } // namespace service_worker
699 } // namespace devtools 699 } // namespace devtools
700 } // namespace content 700 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698