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

Side by Side Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 14619021: Consider "mixed content XHR" as mixed script instead of mixed display. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return; 387 return;
388 } 388 }
389 389
390 // FIXME: ThreadableLoaderOptions.sniffContent is not supported for synchron ous requests. 390 // FIXME: ThreadableLoaderOptions.sniffContent is not supported for synchron ous requests.
391 Vector<char> data; 391 Vector<char> data;
392 ResourceError error; 392 ResourceError error;
393 ResourceResponse response; 393 ResourceResponse response;
394 unsigned long identifier = std::numeric_limits<unsigned long>::max(); 394 unsigned long identifier = std::numeric_limits<unsigned long>::max();
395 if (Frame* frame = m_document->frame()) { 395 if (Frame* frame = m_document->frame()) {
396 Frame* top = frame->tree()->top(); 396 Frame* top = frame->tree()->top();
397 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent(top ->document()->securityOrigin(), requestURL)) { 397 if (!top->loader()->mixedContentChecker()->canRunInsecureContent(top->do cument()->securityOrigin(), requestURL)) {
398 m_client->didFail(error); 398 m_client->didFail(error);
399 return; 399 return;
400 } 400 }
401 identifier = frame->loader()->loadResourceSynchronously(request, m_optio ns.allowCredentials, error, response, data); 401 identifier = frame->loader()->loadResourceSynchronously(request, m_optio ns.allowCredentials, error, response, data);
402 } 402 }
403 403
404 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_ document, identifier, m_client); 404 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_ document, identifier, m_client);
405 405
406 // No exception for file:/// resources, see <rdar://problem/4962298>. 406 // No exception for file:/// resources, see <rdar://problem/4962298>.
407 // Also, if we have an HTTP response, then it wasn't a network error in fact . 407 // Also, if we have an HTTP response, then it wasn't a network error in fact .
(...skipping 26 matching lines...) Expand all
434 434
435 return m_sameOriginRequest && securityOrigin()->canRequest(url); 435 return m_sameOriginRequest && securityOrigin()->canRequest(url);
436 } 436 }
437 437
438 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const 438 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const
439 { 439 {
440 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen t->securityOrigin(); 440 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen t->securityOrigin();
441 } 441 }
442 442
443 } // namespace WebCore 443 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698