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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_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 // 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>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "content/common/gpu_messages.h" 94 #include "content/common/gpu_messages.h"
95 #include "content/common/notification_service.h" 95 #include "content/common/notification_service.h"
96 #include "content/common/resource_messages.h" 96 #include "content/common/resource_messages.h"
97 #include "grit/generated_resources.h" 97 #include "grit/generated_resources.h"
98 #include "ipc/ipc_logging.h" 98 #include "ipc/ipc_logging.h"
99 #include "ipc/ipc_platform_file.h" 99 #include "ipc/ipc_platform_file.h"
100 #include "ipc/ipc_switches.h" 100 #include "ipc/ipc_switches.h"
101 #include "media/base/media_switches.h" 101 #include "media/base/media_switches.h"
102 #include "ui/base/ui_base_switches.h" 102 #include "ui/base/ui_base_switches.h"
103 #include "webkit/fileapi/file_system_path_manager.h" 103 #include "webkit/fileapi/file_system_path_manager.h"
104 #include "webkit/glue/resource_type.h"
104 #include "webkit/plugins/plugin_switches.h" 105 #include "webkit/plugins/plugin_switches.h"
105 106
106 #if defined(OS_WIN) 107 #if defined(OS_WIN)
107 #include <objbase.h> 108 #include <objbase.h>
108 #include "chrome/common/section_util_win.h" 109 #include "chrome/common/section_util_win.h"
109 #endif 110 #endif
110 111
111 using WebKit::WebCache; 112 using WebKit::WebCache;
112 113
113 #include "third_party/skia/include/core/SkBitmap.h" 114 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // right net::URLRequestContext for a request. 241 // right net::URLRequestContext for a request.
241 class RendererURLRequestContextOverride 242 class RendererURLRequestContextOverride
242 : public ResourceMessageFilter::URLRequestContextOverride { 243 : public ResourceMessageFilter::URLRequestContextOverride {
243 public: 244 public:
244 explicit RendererURLRequestContextOverride(Profile* profile) 245 explicit RendererURLRequestContextOverride(Profile* profile)
245 : request_context_(profile->GetRequestContext()), 246 : request_context_(profile->GetRequestContext()),
246 media_request_context_(profile->GetRequestContextForMedia()) { 247 media_request_context_(profile->GetRequestContextForMedia()) {
247 } 248 }
248 249
249 virtual net::URLRequestContext* GetRequestContext( 250 virtual net::URLRequestContext* GetRequestContext(
250 const ResourceHostMsg_Request& resource_request) { 251 ResourceType::Type resource_type) {
251 URLRequestContextGetter* request_context = request_context_; 252 URLRequestContextGetter* request_context = request_context_;
252 // If the request has resource type of ResourceType::MEDIA, we use a request 253 // If the request has resource type of ResourceType::MEDIA, we use a request
253 // context specific to media for handling it because these resources have 254 // context specific to media for handling it because these resources have
254 // specific needs for caching. 255 // specific needs for caching.
255 if (resource_request.resource_type == ResourceType::MEDIA) 256 if (resource_type == ResourceType::MEDIA)
256 request_context = media_request_context_; 257 request_context = media_request_context_;
257 return request_context->GetURLRequestContext(); 258 return request_context->GetURLRequestContext();
258 } 259 }
259 260
260 private: 261 private:
261 virtual ~RendererURLRequestContextOverride() {} 262 virtual ~RendererURLRequestContextOverride() {}
262 263
263 scoped_refptr<URLRequestContextGetter> request_context_; 264 scoped_refptr<URLRequestContextGetter> request_context_;
264 scoped_refptr<URLRequestContextGetter> media_request_context_; 265 scoped_refptr<URLRequestContextGetter> media_request_context_;
265 }; 266 };
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 IPC::PlatformFileForTransit file; 1297 IPC::PlatformFileForTransit file;
1297 #if defined(OS_POSIX) 1298 #if defined(OS_POSIX)
1298 file = base::FileDescriptor(model_file, false); 1299 file = base::FileDescriptor(model_file, false);
1299 #elif defined(OS_WIN) 1300 #elif defined(OS_WIN)
1300 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1301 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1301 false, DUPLICATE_SAME_ACCESS); 1302 false, DUPLICATE_SAME_ACCESS);
1302 #endif 1303 #endif
1303 Send(new ViewMsg_SetPhishingModel(file)); 1304 Send(new ViewMsg_SetPhishingModel(file));
1304 } 1305 }
1305 } 1306 }
OLDNEW
« no previous file with comments | « chrome/browser/gears_integration.cc ('k') | chrome/browser/resources/options/advanced_options.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698