Chromium Code Reviews| Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
| index 7513bbb092d5bb791ce7f32f702d52be504ab967..d1c8073e4a06e4cb3ae626be6e510840c57ae49f 100644 |
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
| @@ -88,6 +88,20 @@ String ServiceWorkerRegistration::scope() const { |
| return handle_->Registration()->Scope().GetString(); |
| } |
| +String ServiceWorkerRegistration::updateViaCache() const { |
| + switch (handle_->Registration()->UpdateViaCache()) { |
| + case WebServiceWorkerUpdateViaCache::kImports: |
| + return "imports"; |
| + case WebServiceWorkerUpdateViaCache::kAll: |
| + return "all"; |
| + case WebServiceWorkerUpdateViaCache::kNone: |
| + return "never"; |
|
nhiroki
2017/07/21 04:39:46
"never" -> "none"?
yuryu
2017/08/03 04:20:05
Done.
|
| + default: |
|
nhiroki
2017/07/21 04:39:46
I'd prefer to avoid 'default' as much as possible
yuryu
2017/08/03 04:20:05
Done.
|
| + return "imports"; |
| + } |
| + return "imports"; |
| +} |
| + |
| ScriptPromise ServiceWorkerRegistration::update(ScriptState* script_state) { |
| ServiceWorkerContainerClient* client = |
| ServiceWorkerContainerClient::From(GetExecutionContext()); |