| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |