| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Returns true if the |pattern| has at least one process to run. | 85 // Returns true if the |pattern| has at least one process to run. |
| 86 bool PatternHasProcessToRun(const GURL& pattern) const; | 86 bool PatternHasProcessToRun(const GURL& pattern) const; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, SortProcess); | 89 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, SortProcess); |
| 90 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, | 90 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, |
| 91 FindAvailableProcess); | 91 FindAvailableProcess); |
| 92 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, | 92 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, |
| 93 AllocateWorkerProcess_FindAvailableProcess); | 93 AllocateWorkerProcess_FindAvailableProcess); |
| 94 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, | 94 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, |
| 95 AllocateWorkerProcess_WithProcessReuse); |
| 96 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, |
| 97 AllocateWorkerProcess_WithoutProcessReuse); |
| 98 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerProcessManagerTest, |
| 95 AllocateWorkerProcess_InShutdown); | 99 AllocateWorkerProcess_InShutdown); |
| 96 | 100 |
| 97 // Information about the process for an EmbeddedWorkerInstance. | 101 // Information about the process for an EmbeddedWorkerInstance. |
| 98 struct ProcessInfo { | 102 struct ProcessInfo { |
| 99 explicit ProcessInfo(const scoped_refptr<SiteInstance>& site_instance); | 103 explicit ProcessInfo(const scoped_refptr<SiteInstance>& site_instance); |
| 100 explicit ProcessInfo(int process_id); | 104 explicit ProcessInfo(int process_id); |
| 101 ProcessInfo(const ProcessInfo& other); | 105 ProcessInfo(const ProcessInfo& other); |
| 102 ~ProcessInfo(); | 106 ~ProcessInfo(); |
| 103 | 107 |
| 104 // Stores the SiteInstance the Worker lives inside. This needs to outlive | 108 // Stores the SiteInstance the Worker lives inside. This needs to outlive |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 167 |
| 164 namespace std { | 168 namespace std { |
| 165 // Specialized to post the deletion to the UI thread. | 169 // Specialized to post the deletion to the UI thread. |
| 166 template <> | 170 template <> |
| 167 struct CONTENT_EXPORT default_delete<content::ServiceWorkerProcessManager> { | 171 struct CONTENT_EXPORT default_delete<content::ServiceWorkerProcessManager> { |
| 168 void operator()(content::ServiceWorkerProcessManager* ptr) const; | 172 void operator()(content::ServiceWorkerProcessManager* ptr) const; |
| 169 }; | 173 }; |
| 170 } // namespace std | 174 } // namespace std |
| 171 | 175 |
| 172 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ | 176 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ |
| OLD | NEW |