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

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 23102017: DevTools: fix source maps loading from file scheme urls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 7 years, 3 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
« no previous file with comments | « LayoutTests/inspector/resources/file-resource-to-load-for-frontend.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 Frame* frame = m_pageAgent->assertFrame(errorString, frameId); 708 Frame* frame = m_pageAgent->assertFrame(errorString, frameId);
709 if (!frame) 709 if (!frame)
710 return; 710 return;
711 711
712 Document* document = frame->document(); 712 Document* document = frame->document();
713 if (!document) { 713 if (!document) {
714 *errorString = "No Document instance for the specified frame"; 714 *errorString = "No Document instance for the specified frame";
715 return; 715 return;
716 } 716 }
717 717
718 KURL kurl = KURL(ParsedURLString, url);
719 if (kurl.isLocalFile()) {
720 *errorString = "Can not load local file";
721 return;
722 }
723
724 ResourceRequest request(url); 718 ResourceRequest request(url);
725 request.setHTTPMethod("GET"); 719 request.setHTTPMethod("GET");
726 request.setCachePolicy(ReloadIgnoringCacheData); 720 request.setCachePolicy(ReloadIgnoringCacheData);
727 if (requestHeaders) { 721 if (requestHeaders) {
728 for (JSONObject::iterator it = (*requestHeaders)->begin(); it != (*reque stHeaders)->end(); ++it) { 722 for (JSONObject::iterator it = (*requestHeaders)->begin(); it != (*reque stHeaders)->end(); ++it) {
729 String value; 723 String value;
730 bool success = it->value->asString(&value); 724 bool success = it->value->asString(&value);
731 if (!success) { 725 if (!success) {
732 *errorString = "Request header \"" + it->key + "\" value is not a string"; 726 *errorString = "Request header \"" + it->key + "\" value is not a string";
733 return; 727 return;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 , m_overlay(overlay) 776 , m_overlay(overlay)
783 , m_frontend(0) 777 , m_frontend(0)
784 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 778 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
785 , m_loadingXHRSynchronously(false) 779 , m_loadingXHRSynchronously(false)
786 , m_isRecalculatingStyle(false) 780 , m_isRecalculatingStyle(false)
787 { 781 {
788 } 782 }
789 783
790 } // namespace WebCore 784 } // namespace WebCore
791 785
OLDNEW
« no previous file with comments | « LayoutTests/inspector/resources/file-resource-to-load-for-frontend.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698