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

Side by Side Diff: chrome/browser/renderer_host/socket_stream_dispatcher_host.cc

Issue 6338002: net: Remove typedef net::URLRequestContext URLRequestContext; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for real Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_host/socket_stream_dispatcher_host.h" 5 #include "chrome/browser/renderer_host/socket_stream_dispatcher_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/renderer_host/socket_stream_host.h" 9 #include "chrome/browser/renderer_host/socket_stream_host.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
11 #include "chrome/common/net/socket_stream.h" 11 #include "chrome/common/net/socket_stream.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void SocketStreamDispatcherHost::DeleteSocketStreamHost(int socket_id) { 139 void SocketStreamDispatcherHost::DeleteSocketStreamHost(int socket_id) {
140 SocketStreamHost* socket_stream_host = hosts_.Lookup(socket_id); 140 SocketStreamHost* socket_stream_host = hosts_.Lookup(socket_id);
141 DCHECK(socket_stream_host); 141 DCHECK(socket_stream_host);
142 delete socket_stream_host; 142 delete socket_stream_host;
143 hosts_.Remove(socket_id); 143 hosts_.Remove(socket_id);
144 if (!Send(new ViewMsg_SocketStream_Closed(socket_id))) { 144 if (!Send(new ViewMsg_SocketStream_Closed(socket_id))) {
145 LOG(ERROR) << "ViewMsg_SocketStream_Closed failed."; 145 LOG(ERROR) << "ViewMsg_SocketStream_Closed failed.";
146 } 146 }
147 } 147 }
148 148
149 URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() { 149 net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() {
150 URLRequestContext* rv = NULL; 150 net::URLRequestContext* rv = NULL;
151 if (url_request_context_override_.get()) { 151 if (url_request_context_override_.get()) {
152 rv = url_request_context_override_->GetRequestContext( 152 rv = url_request_context_override_->GetRequestContext(
153 0, ResourceType::SUB_RESOURCE); 153 0, ResourceType::SUB_RESOURCE);
154 } 154 }
155 if (!rv) { 155 if (!rv) {
156 URLRequestContextGetter* context_getter = 156 URLRequestContextGetter* context_getter =
157 Profile::GetDefaultRequestContext(); 157 Profile::GetDefaultRequestContext();
158 if (context_getter) 158 if (context_getter)
159 rv = context_getter->GetURLRequestContext(); 159 rv = context_getter->GetURLRequestContext();
160 } 160 }
161 161
162 return rv; 162 return rv;
163 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698