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_core.h" | 5 #include "content/browser/service_worker/service_worker_context_core.h" |
| 6 | 6 |
| 7 #include "base/barrier_closure.h" | 7 #include "base/barrier_closure.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 callback.Run(status, registration->id()); | 303 callback.Run(status, registration->id()); |
| 304 if (observer_list_.get()) { | 304 if (observer_list_.get()) { |
| 305 observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationStored, | 305 observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationStored, |
| 306 pattern); | 306 pattern); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 void ServiceWorkerContextCore::UnregistrationComplete( | 310 void ServiceWorkerContextCore::UnregistrationComplete( |
| 311 const GURL& pattern, | 311 const GURL& pattern, |
| 312 const ServiceWorkerContextCore::UnregistrationCallback& callback, | 312 const ServiceWorkerContextCore::UnregistrationCallback& callback, |
| 313 int64 registration_id, | |
| 313 ServiceWorkerStatusCode status) { | 314 ServiceWorkerStatusCode status) { |
| 314 callback.Run(status); | 315 callback.Run(status); |
| 315 if (observer_list_.get()) { | 316 if (observer_list_.get()) { |
| 316 observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationDeleted, | 317 observer_list_->Notify(&ServiceWorkerContextObserver::OnRegistrationDeleted, |
|
michaeln
2015/01/09 22:58:41
Seems odd that this notif can happen even if nothi
Marijn Kruisselbrink
2015/01/09 23:13:15
Yes, that does seem odd (but not anything introduc
| |
| 317 pattern); | 318 registration_id, pattern); |
| 318 } | 319 } |
| 319 } | 320 } |
| 320 | 321 |
| 321 ServiceWorkerRegistration* ServiceWorkerContextCore::GetLiveRegistration( | 322 ServiceWorkerRegistration* ServiceWorkerContextCore::GetLiveRegistration( |
| 322 int64 id) { | 323 int64 id) { |
| 323 RegistrationsMap::iterator it = live_registrations_.find(id); | 324 RegistrationsMap::iterator it = live_registrations_.find(id); |
| 324 return (it != live_registrations_.end()) ? it->second : NULL; | 325 return (it != live_registrations_.end()) ? it->second : NULL; |
| 325 } | 326 } |
| 326 | 327 |
| 327 void ServiceWorkerContextCore::AddLiveRegistration( | 328 void ServiceWorkerContextCore::AddLiveRegistration( |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 495 source_identifier, message_level, message, line_number, source_url)); | 496 source_identifier, message_level, message, line_number, source_url)); |
| 496 } | 497 } |
| 497 | 498 |
| 498 ServiceWorkerProcessManager* ServiceWorkerContextCore::process_manager() { | 499 ServiceWorkerProcessManager* ServiceWorkerContextCore::process_manager() { |
| 499 if (wrapper_) | 500 if (wrapper_) |
| 500 return wrapper_->process_manager(); | 501 return wrapper_->process_manager(); |
| 501 return NULL; | 502 return NULL; |
| 502 } | 503 } |
| 503 | 504 |
| 504 } // namespace content | 505 } // namespace content |
| OLD | NEW |