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

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

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: windows fixes Created 9 years, 9 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) 2011 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 "content/browser/renderer_host/socket_stream_dispatcher_host.h" 5 #include "content/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/common/net/url_request_context_getter.h" 9 #include "chrome/common/net/url_request_context_getter.h"
10 #include "chrome/common/render_messages_params.h"
11 #include "content/browser/renderer_host/socket_stream_host.h" 10 #include "content/browser/renderer_host/socket_stream_host.h"
12 #include "content/common/socket_stream.h" 11 #include "content/common/socket_stream.h"
13 #include "content/common/socket_stream_messages.h" 12 #include "content/common/socket_stream_messages.h"
14 #include "content/common/resource_messages.h" 13 #include "content/common/resource_messages.h"
15 #include "net/websockets/websocket_job.h" 14 #include "net/websockets/websocket_job.h"
16 #include "net/websockets/websocket_throttle.h" 15 #include "net/websockets/websocket_throttle.h"
17 16
18 SocketStreamDispatcherHost::SocketStreamDispatcherHost() { 17 SocketStreamDispatcherHost::SocketStreamDispatcherHost() {
19 net::WebSocketJob::EnsureInit(); 18 net::WebSocketJob::EnsureInit();
20 } 19 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 delete socket_stream_host; 143 delete socket_stream_host;
145 hosts_.Remove(socket_id); 144 hosts_.Remove(socket_id);
146 if (!Send(new SocketStreamMsg_Closed(socket_id))) { 145 if (!Send(new SocketStreamMsg_Closed(socket_id))) {
147 LOG(ERROR) << "SocketStreamMsg_Closed failed."; 146 LOG(ERROR) << "SocketStreamMsg_Closed failed.";
148 } 147 }
149 } 148 }
150 149
151 net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() { 150 net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() {
152 net::URLRequestContext* rv = NULL; 151 net::URLRequestContext* rv = NULL;
153 if (url_request_context_override_.get()) { 152 if (url_request_context_override_.get()) {
154 // TODO(jam): temporary code until Gears is taken out, then 153 rv = url_request_context_override_->GetRequestContext(
155 // GetRequestContext will take a different parameter and we can take out 154 ResourceType::SUB_RESOURCE);
156 // this struct and the #include "chrome/common/render_messages_params.h"
157 // above.
158 ResourceHostMsg_Request request;
159 rv = url_request_context_override_->GetRequestContext(request);
160 } 155 }
161 if (!rv) { 156 if (!rv) {
162 URLRequestContextGetter* context_getter = 157 URLRequestContextGetter* context_getter =
163 Profile::GetDefaultRequestContext(); 158 Profile::GetDefaultRequestContext();
164 if (context_getter) 159 if (context_getter)
165 rv = context_getter->GetURLRequestContext(); 160 rv = context_getter->GetURLRequestContext();
166 } 161 }
167 162
168 return rv; 163 return rv;
169 } 164 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_queue_unittest.cc ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698