Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: content/browser/resource_context_impl.cc

Issue 2064293002: Remove unused test code in ~ResourceContext to handle it being destructed on UI threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698