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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <limits> 11 #include <limits>
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 private: 223 private:
224 bool reset_needed_; 224 bool reset_needed_;
225 bool has_receiver_; 225 bool has_receiver_;
226 VisitedLinkCommon::Fingerprints pending_; 226 VisitedLinkCommon::Fingerprints pending_;
227 }; 227 };
228 228
229 namespace { 229 namespace {
230 230
231 // Helper class that we pass to ResourceMessageFilter so that it can find the 231 // Helper class that we pass to ResourceMessageFilter so that it can find the
232 // right URLRequestContext for a request. 232 // right net::URLRequestContext for a request.
233 class RendererURLRequestContextOverride 233 class RendererURLRequestContextOverride
234 : public ResourceMessageFilter::URLRequestContextOverride { 234 : public ResourceMessageFilter::URLRequestContextOverride {
235 public: 235 public:
236 explicit RendererURLRequestContextOverride(Profile* profile) 236 explicit RendererURLRequestContextOverride(Profile* profile)
237 : request_context_(profile->GetRequestContext()), 237 : request_context_(profile->GetRequestContext()),
238 media_request_context_(profile->GetRequestContextForMedia()) { 238 media_request_context_(profile->GetRequestContextForMedia()) {
239 } 239 }
240 240
241 virtual URLRequestContext* GetRequestContext( 241 virtual net::URLRequestContext* GetRequestContext(
242 uint32 request_id, ResourceType::Type resource_type) { 242 uint32 request_id, ResourceType::Type resource_type) {
243 URLRequestContextGetter* request_context = request_context_; 243 URLRequestContextGetter* request_context = request_context_;
244 // If the request has resource type of ResourceType::MEDIA, we use a request 244 // If the request has resource type of ResourceType::MEDIA, we use a request
245 // context specific to media for handling it because these resources have 245 // context specific to media for handling it because these resources have
246 // specific needs for caching. 246 // specific needs for caching.
247 if (resource_type == ResourceType::MEDIA) 247 if (resource_type == ResourceType::MEDIA)
248 request_context = media_request_context_; 248 request_context = media_request_context_;
249 return request_context->GetURLRequestContext(); 249 return request_context->GetURLRequestContext();
250 } 250 }
251 251
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 IPC::PlatformFileForTransit file; 1288 IPC::PlatformFileForTransit file;
1289 #if defined(OS_POSIX) 1289 #if defined(OS_POSIX)
1290 file = base::FileDescriptor(model_file, false); 1290 file = base::FileDescriptor(model_file, false);
1291 #elif defined(OS_WIN) 1291 #elif defined(OS_WIN)
1292 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1292 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1293 false, DUPLICATE_SAME_ACCESS); 1293 false, DUPLICATE_SAME_ACCESS);
1294 #endif 1294 #endif
1295 Send(new ViewMsg_SetPhishingModel(file)); 1295 Send(new ViewMsg_SetPhishingModel(file));
1296 } 1296 }
1297 } 1297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698