OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/net/nss_context.h" | 5 #include "chrome/browser/net/nss_context.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
8 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
9 #include "chrome/browser/profiles/profile_io_data.h" | 10 #include "chrome/browser/profiles/profile_io_data.h" |
10 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
11 #include "crypto/nss_util_internal.h" | 12 #include "crypto/nss_util_internal.h" |
12 #include "net/cert/nss_cert_database_chromeos.h" | 13 #include "net/cert/nss_cert_database_chromeos.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 void* kDatabaseManagerKey = &kDatabaseManagerKey; | 17 void* kDatabaseManagerKey = &kDatabaseManagerKey; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 137 |
137 void EnableNSSSystemKeySlotForResourceContext( | 138 void EnableNSSSystemKeySlotForResourceContext( |
138 content::ResourceContext* context) { | 139 content::ResourceContext* context) { |
139 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 140 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
140 base::Callback<void(crypto::ScopedPK11Slot)> callback = | 141 base::Callback<void(crypto::ScopedPK11Slot)> callback = |
141 base::Bind(&SetSystemSlotOfDBForResourceContext, context); | 142 base::Bind(&SetSystemSlotOfDBForResourceContext, context); |
142 crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback); | 143 crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback); |
143 if (system_slot) | 144 if (system_slot) |
144 callback.Run(system_slot.Pass()); | 145 callback.Run(system_slot.Pass()); |
145 } | 146 } |
OLD | NEW |