| 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_version.h" | 5 #include "content/browser/service_worker/service_worker_version.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "content/browser/service_worker/embedded_worker_instance.h" | 10 #include "content/browser/service_worker/embedded_worker_instance.h" |
| 11 #include "content/browser/service_worker/embedded_worker_registry.h" | 11 #include "content/browser/service_worker/embedded_worker_registry.h" |
| 12 #include "content/browser/service_worker/service_worker_context_core.h" | 12 #include "content/browser/service_worker/service_worker_context_core.h" |
| 13 #include "content/browser/service_worker/service_worker_registration.h" | 13 #include "content/browser/service_worker/service_worker_registration.h" |
| 14 #include "content/browser/service_worker/service_worker_utils.h" | 14 #include "content/browser/service_worker/service_worker_utils.h" |
| 15 #include "content/common/service_worker/service_worker_messages.h" | 15 #include "content/common/service_worker/service_worker_messages.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
| 18 #include "webkit/browser/blob/blob_data_handle.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 typedef ServiceWorkerVersion::StatusCallback StatusCallback; | 22 typedef ServiceWorkerVersion::StatusCallback StatusCallback; |
| 22 typedef ServiceWorkerVersion::MessageCallback MessageCallback; | 23 typedef ServiceWorkerVersion::MessageCallback MessageCallback; |
| 23 | 24 |
| 24 namespace { | 25 namespace { |
| 25 | 26 |
| 26 // Default delay to stop the worker context after all documents that | 27 // Default delay to stop the worker context after all documents that |
| 27 // are associated to the worker are closed. | 28 // are associated to the worker are closed. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 return; | 582 return; |
| 582 } | 583 } |
| 583 stop_worker_timer_.Start( | 584 stop_worker_timer_.Start( |
| 584 FROM_HERE, base::TimeDelta::FromSeconds(kStopWorkerDelay), | 585 FROM_HERE, base::TimeDelta::FromSeconds(kStopWorkerDelay), |
| 585 base::Bind(&ServiceWorkerVersion::StopWorker, | 586 base::Bind(&ServiceWorkerVersion::StopWorker, |
| 586 weak_factory_.GetWeakPtr(), | 587 weak_factory_.GetWeakPtr(), |
| 587 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback))); | 588 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback))); |
| 588 } | 589 } |
| 589 | 590 |
| 590 } // namespace content | 591 } // namespace content |
| OLD | NEW |