Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/service_worker_context_wrapper.h" | 5 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 ServiceWorkerStatusCode status, | 383 ServiceWorkerStatusCode status, |
| 384 const scoped_refptr<ServiceWorkerRegistration>& registration) { | 384 const scoped_refptr<ServiceWorkerRegistration>& registration) { |
| 385 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 385 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 386 | 386 |
| 387 if (status != SERVICE_WORKER_OK) | 387 if (status != SERVICE_WORKER_OK) |
| 388 return; | 388 return; |
| 389 if (!context_core_) | 389 if (!context_core_) |
| 390 return; | 390 return; |
| 391 DCHECK(registration); | 391 DCHECK(registration); |
| 392 context_core_->UpdateServiceWorker(registration.get(), | 392 context_core_->UpdateServiceWorker(registration.get(), |
| 393 true /* force_bypass_cache */); | 393 false /* force_bypass_cache */); |
|
nhiroki
2015/09/07 07:05:59
This should be true because this function is calle
jungkees
2015/09/08 16:01:13
I wanted to have your comment on this indeed. So,
nhiroki
2015/09/09 08:27:48
A separate CL should be OK. Can you leave a TODO c
jungkees
2015/09/09 13:13:37
Done.
| |
| 394 } | 394 } |
| 395 | 395 |
| 396 namespace { | 396 namespace { |
| 397 void StatusCodeToBoolCallbackAdapter( | 397 void StatusCodeToBoolCallbackAdapter( |
| 398 const ServiceWorkerContext::ResultCallback& callback, | 398 const ServiceWorkerContext::ResultCallback& callback, |
| 399 ServiceWorkerStatusCode code) { | 399 ServiceWorkerStatusCode code) { |
| 400 callback.Run(code == ServiceWorkerStatusCode::SERVICE_WORKER_OK); | 400 callback.Run(code == ServiceWorkerStatusCode::SERVICE_WORKER_OK); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void EmptySuccessCallback(bool success) { | 403 void EmptySuccessCallback(bool success) { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 630 observer_list_->Notify(FROM_HERE, | 630 observer_list_->Notify(FROM_HERE, |
| 631 &ServiceWorkerContextObserver::OnStorageWiped); | 631 &ServiceWorkerContextObserver::OnStorageWiped); |
| 632 } | 632 } |
| 633 | 633 |
| 634 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { | 634 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { |
| 635 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 635 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 636 return context_core_.get(); | 636 return context_core_.get(); |
| 637 } | 637 } |
| 638 | 638 |
| 639 } // namespace content | 639 } // namespace content |
| OLD | NEW |