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

Side by Side Diff: chrome/renderer/renderer_glue.cc

Issue 46094: Fix our handling of mixed SSL / non-SSL content.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file provides the embedder's side of random webkit glue functions. 5 // This file provides the embedder's side of random webkit glue functions.
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return results; 228 return results;
229 } 229 }
230 230
231 // static factory function 231 // static factory function
232 ResourceLoaderBridge* ResourceLoaderBridge::Create( 232 ResourceLoaderBridge* ResourceLoaderBridge::Create(
233 WebFrame* webframe, 233 WebFrame* webframe,
234 const std::string& method, 234 const std::string& method,
235 const GURL& url, 235 const GURL& url,
236 const GURL& policy_url, 236 const GURL& policy_url,
237 const GURL& referrer, 237 const GURL& referrer,
238 const std::string& frame_origin,
239 const std::string& main_frame_origin,
238 const std::string& headers, 240 const std::string& headers,
239 int load_flags, 241 int load_flags,
240 int origin_pid, 242 int origin_pid,
241 ResourceType::Type resource_type, 243 ResourceType::Type resource_type) {
242 bool mixed_content) {
243 // TODO(darin): we need to eliminate the webframe parameter because webkit 244 // TODO(darin): we need to eliminate the webframe parameter because webkit
244 // does not always supply it (see ResourceHandle::loadResourceSynchronously). 245 // does not always supply it (see ResourceHandle::loadResourceSynchronously).
245 // Instead we should add context to ResourceRequest, which will be easy to do 246 // Instead we should add context to ResourceRequest, which will be easy to do
246 // once we merge to the latest WebKit (r23806 at least). 247 // once we merge to the latest WebKit (r23806 at least).
247 if (!webframe) { 248 if (!webframe) {
248 NOTREACHED() << "no webframe"; 249 NOTREACHED() << "no webframe";
249 return NULL; 250 return NULL;
250 } 251 }
251 252
252 if (!webframe->GetView()->GetDelegate()) 253 if (!webframe->GetView()->GetDelegate())
253 return NULL; 254 return NULL;
254 255
255 RenderView* rv = static_cast<RenderView*>(webframe->GetView()->GetDelegate()); 256 RenderView* rv = static_cast<RenderView*>(webframe->GetView()->GetDelegate());
256 int route_id = rv->routing_id(); 257 int route_id = rv->routing_id();
257 ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher(); 258 ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher();
258 return dispatch->CreateBridge(method, url, policy_url, referrer, headers, 259 return dispatch->CreateBridge(method, url, policy_url, referrer,
259 load_flags, origin_pid, resource_type, 260 frame_origin, main_frame_origin, headers,
260 mixed_content, 0, route_id); 261 load_flags, origin_pid, resource_type, 0,
262 route_id);
261 } 263 }
262 264
263 void NotifyCacheStats() { 265 void NotifyCacheStats() {
264 // Update the browser about our cache 266 // Update the browser about our cache
265 // NOTE: Since this can be called from the plugin process, we might not have 267 // NOTE: Since this can be called from the plugin process, we might not have
266 // a RenderThread. Do nothing in that case. 268 // a RenderThread. Do nothing in that case.
267 if (!IsPluginProcess()) 269 if (!IsPluginProcess())
268 RenderThread::current()->InformHostOfCacheStatsLater(); 270 RenderThread::current()->InformHostOfCacheStatsLater();
269 } 271 }
270 272
271 273
272 } // namespace webkit_glue 274 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698