OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/appcache/appcache_navigation_handle_core.h" | 5 #include "content/browser/appcache/appcache_navigation_handle_core.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "content/browser/appcache/appcache_host.h" | 12 #include "content/browser/appcache/appcache_host.h" |
13 #include "content/browser/appcache/appcache_navigation_handle.h" | 13 #include "content/browser/appcache/appcache_navigation_handle.h" |
14 #include "content/browser/appcache/appcache_service_impl.h" | 14 #include "content/browser/appcache/appcache_service_impl.h" |
15 #include "content/browser/appcache/chrome_appcache_service.h" | 15 #include "content/browser/appcache/chrome_appcache_service.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Map of AppCache host id to the AppCacheNavigationHandleCore instance. | 20 // Map of AppCache host id to the AppCacheNavigationHandleCore instance. |
21 // Accessed on the IO thread only. | 21 // Accessed on the IO thread only. |
22 using AppCacheHandleMap = | 22 using AppCacheHandleMap = |
23 std::map <int, content::AppCacheNavigationHandleCore*>; | 23 std::map <int, content::AppCacheNavigationHandleCore*>; |
24 base::LazyInstance<AppCacheHandleMap> g_appcache_handle_map; | 24 base::LazyInstance<AppCacheHandleMap>::DestructorAtExit g_appcache_handle_map; |
Nico
2017/03/07 21:43:02
= LAZY_INSTANCE_INITIALIZER
scottmg
2017/03/07 21:56:30
Done. I am wondering why we do this at all now sin
| |
25 | 25 |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 | 30 |
31 AppCacheNavigationHandleCore::AppCacheNavigationHandleCore( | 31 AppCacheNavigationHandleCore::AppCacheNavigationHandleCore( |
32 base::WeakPtr<AppCacheNavigationHandle> ui_handle, | 32 base::WeakPtr<AppCacheNavigationHandle> ui_handle, |
33 ChromeAppCacheService* appcache_service, | 33 ChromeAppCacheService* appcache_service, |
34 int appcache_host_id) | 34 int appcache_host_id) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 DCHECK(false); | 116 DCHECK(false); |
117 } | 117 } |
118 | 118 |
119 void AppCacheNavigationHandleCore::OnContentBlocked(int host_id, | 119 void AppCacheNavigationHandleCore::OnContentBlocked(int host_id, |
120 const GURL& manifest_url) { | 120 const GURL& manifest_url) { |
121 // Should never be called. | 121 // Should never be called. |
122 DCHECK(false); | 122 DCHECK(false); |
123 } | 123 } |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
OLD | NEW |