| 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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "content/browser/service_worker/service_worker_context_core.h" | 8 #include "content/browser/service_worker/service_worker_context_core.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "webkit/browser/quota/quota_manager_proxy.h" | 10 #include "webkit/browser/quota/quota_manager_proxy.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 script_url, | 76 script_url, |
| 77 source_process_id, | 77 source_process_id, |
| 78 continuation)); | 78 continuation)); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 | 81 |
| 82 context()->RegisterServiceWorker( | 82 context()->RegisterServiceWorker( |
| 83 pattern, | 83 pattern, |
| 84 script_url, | 84 script_url, |
| 85 source_process_id, | 85 source_process_id, |
| 86 NULL /* provider_host */, |
| 86 base::Bind(&FinishRegistrationOnIO, continuation)); | 87 base::Bind(&FinishRegistrationOnIO, continuation)); |
| 87 } | 88 } |
| 88 | 89 |
| 89 static void FinishUnregistrationOnIO( | 90 static void FinishUnregistrationOnIO( |
| 90 const ServiceWorkerContext::ResultCallback& continuation, | 91 const ServiceWorkerContext::ResultCallback& continuation, |
| 91 ServiceWorkerStatusCode status) { | 92 ServiceWorkerStatusCode status) { |
| 92 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 93 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 93 BrowserThread::PostTask( | 94 BrowserThread::PostTask( |
| 94 BrowserThread::UI, | 95 BrowserThread::UI, |
| 95 FROM_HERE, | 96 FROM_HERE, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 108 this, | 109 this, |
| 109 pattern, | 110 pattern, |
| 110 source_process_id, | 111 source_process_id, |
| 111 continuation)); | 112 continuation)); |
| 112 return; | 113 return; |
| 113 } | 114 } |
| 114 | 115 |
| 115 context()->UnregisterServiceWorker( | 116 context()->UnregisterServiceWorker( |
| 116 pattern, | 117 pattern, |
| 117 source_process_id, | 118 source_process_id, |
| 119 NULL /* provider_host */, |
| 118 base::Bind(&FinishUnregistrationOnIO, continuation)); | 120 base::Bind(&FinishUnregistrationOnIO, continuation)); |
| 119 } | 121 } |
| 120 | 122 |
| 121 } // namespace content | 123 } // namespace content |
| OLD | NEW |