| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/resource_context_impl.h" | 5 #include "content/browser/resource_context_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 base::Unretained(rdhi), this)); | 47 base::Unretained(rdhi), this)); |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 ResourceContext::~ResourceContext() { | 51 ResourceContext::~ResourceContext() { |
| 52 ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get(); | 52 ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get(); |
| 53 if (rdhi) { | 53 if (rdhi) { |
| 54 rdhi->CancelRequestsForContext(this); | 54 rdhi->CancelRequestsForContext(this); |
| 55 rdhi->RemoveResourceContext(this); | 55 rdhi->RemoveResourceContext(this); |
| 56 } | 56 } |
| 57 | |
| 58 // In some tests this object is destructed on UI thread. | |
| 59 DetachUserDataThread(); | |
| 60 } | 57 } |
| 61 | 58 |
| 62 ResourceContext::SaltCallback ResourceContext::GetMediaDeviceIDSalt() { | 59 ResourceContext::SaltCallback ResourceContext::GetMediaDeviceIDSalt() { |
| 63 return base::Bind(&ReturnEmptySalt); | 60 return base::Bind(&ReturnEmptySalt); |
| 64 } | 61 } |
| 65 | 62 |
| 66 std::unique_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() { | 63 std::unique_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() { |
| 67 return std::unique_ptr<net::ClientCertStore>(); | 64 return std::unique_ptr<net::ClientCertStore>(); |
| 68 } | 65 } |
| 69 | 66 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 108 |
| 112 resource_context->SetUserData( | 109 resource_context->SetUserData( |
| 113 kStreamContextKeyName, | 110 kStreamContextKeyName, |
| 114 new UserDataAdapter<StreamContext>( | 111 new UserDataAdapter<StreamContext>( |
| 115 StreamContext::GetFor(browser_context))); | 112 StreamContext::GetFor(browser_context))); |
| 116 | 113 |
| 117 resource_context->DetachUserDataThread(); | 114 resource_context->DetachUserDataThread(); |
| 118 } | 115 } |
| 119 | 116 |
| 120 } // namespace content | 117 } // namespace content |
| OLD | NEW |