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 <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "content/common/service_worker/service_worker_status_code.h" | 16 #include "content/common/service_worker/service_worker_status_code.h" |
16 | 17 |
17 class GURL; | 18 class GURL; |
18 | 19 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // UI thread. | 124 // UI thread. |
124 PatternProcessRefMap pattern_processes_; | 125 PatternProcessRefMap pattern_processes_; |
125 | 126 |
126 // Used to double-check that we don't access *this after it's destroyed. | 127 // Used to double-check that we don't access *this after it's destroyed. |
127 base::WeakPtr<ServiceWorkerProcessManager> weak_this_; | 128 base::WeakPtr<ServiceWorkerProcessManager> weak_this_; |
128 base::WeakPtrFactory<ServiceWorkerProcessManager> weak_this_factory_; | 129 base::WeakPtrFactory<ServiceWorkerProcessManager> weak_this_factory_; |
129 }; | 130 }; |
130 | 131 |
131 } // namespace content | 132 } // namespace content |
132 | 133 |
133 namespace base { | 134 namespace std { |
134 // Specialized to post the deletion to the UI thread. | 135 // Specialized to post the deletion to the UI thread. |
135 template <> | 136 template <> |
136 struct CONTENT_EXPORT DefaultDeleter<content::ServiceWorkerProcessManager> { | 137 struct CONTENT_EXPORT default_delete<content::ServiceWorkerProcessManager> { |
137 void operator()(content::ServiceWorkerProcessManager* ptr) const; | 138 void operator()(content::ServiceWorkerProcessManager* ptr) const; |
138 }; | 139 }; |
139 } // namespace base | 140 } // namespace std |
140 | 141 |
141 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ | 142 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROCESS_MANAGER_H_ |
OLD | NEW |