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/embedded_worker_instance.h" | 5 #include "content/browser/service_worker/embedded_worker_instance.h" |
6 | 6 |
7 #include "content/browser/service_worker/embedded_worker_registry.h" | 7 #include "content/browser/service_worker/embedded_worker_registry.h" |
8 #include "content/common/service_worker_messages.h" | 8 #include "content/common/service_worker/embedded_worker_messages.h" |
9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 EmbeddedWorkerInstance::~EmbeddedWorkerInstance() { | 13 EmbeddedWorkerInstance::~EmbeddedWorkerInstance() { |
14 registry_->RemoveWorker(process_id_, embedded_worker_id_); | 14 registry_->RemoveWorker(process_id_, embedded_worker_id_); |
15 } | 15 } |
16 | 16 |
17 bool EmbeddedWorkerInstance::Start( | 17 bool EmbeddedWorkerInstance::Start( |
18 int64 service_worker_version_id, | 18 int64 service_worker_version_id, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 max_ref_iter->second < iter->second) | 104 max_ref_iter->second < iter->second) |
105 max_ref_iter = iter; | 105 max_ref_iter = iter; |
106 } | 106 } |
107 if (max_ref_iter == process_refs_.end()) | 107 if (max_ref_iter == process_refs_.end()) |
108 return false; | 108 return false; |
109 process_id_ = max_ref_iter->first; | 109 process_id_ = max_ref_iter->first; |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 } // namespace content | 113 } // namespace content |
OLD | NEW |