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

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

Issue 2062263002: Remove debugging code for fixed bugs. Also clean up unused includes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again 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 | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | 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/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace content { 26 namespace content {
27 27
28 // Key names on ResourceContext. 28 // Key names on ResourceContext.
29 const char kBlobStorageContextKeyName[] = "content_blob_storage_context"; 29 const char kBlobStorageContextKeyName[] = "content_blob_storage_context";
30 const char kStreamContextKeyName[] = "content_stream_context"; 30 const char kStreamContextKeyName[] = "content_stream_context";
31 const char kURLDataManagerBackendKeyName[] = "url_data_manager_backend"; 31 const char kURLDataManagerBackendKeyName[] = "url_data_manager_backend";
32 32
33 ResourceContext::ResourceContext() 33 ResourceContext::ResourceContext()
34 : media_device_id_salt_(CreateRandomMediaDeviceIDSalt()) { 34 : media_device_id_salt_(CreateRandomMediaDeviceIDSalt()) {
35 ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get();
36 if (rdhi) {
37 BrowserThread::PostTask(
38 BrowserThread::IO, FROM_HERE,
39 base::Bind(&ResourceDispatcherHostImpl::AddResourceContext,
40 base::Unretained(rdhi), this));
41 }
42 } 35 }
43 36
44 ResourceContext::~ResourceContext() { 37 ResourceContext::~ResourceContext() {
45 ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get(); 38 if (ResourceDispatcherHostImpl::Get())
46 if (rdhi) { 39 ResourceDispatcherHostImpl::Get()->CancelRequestsForContext(this);
47 rdhi->CancelRequestsForContext(this);
48 rdhi->RemoveResourceContext(this);
49 }
50 } 40 }
51 41
52 std::string ResourceContext::GetMediaDeviceIDSalt() { 42 std::string ResourceContext::GetMediaDeviceIDSalt() {
53 return media_device_id_salt_; 43 return media_device_id_salt_;
54 } 44 }
55 45
56 std::unique_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() { 46 std::unique_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() {
57 return std::unique_ptr<net::ClientCertStore>(); 47 return std::unique_ptr<net::ClientCertStore>();
58 } 48 }
59 49
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 99
110 resource_context->SetUserData( 100 resource_context->SetUserData(
111 kStreamContextKeyName, 101 kStreamContextKeyName,
112 new UserDataAdapter<StreamContext>( 102 new UserDataAdapter<StreamContext>(
113 StreamContext::GetFor(browser_context))); 103 StreamContext::GetFor(browser_context)));
114 104
115 resource_context->DetachUserDataThread(); 105 resource_context->DetachUserDataThread();
116 } 106 }
117 107
118 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698