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

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

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 if (!errorString.isEmpty()) { 521 if (!errorString.isEmpty()) {
522 callback->sendFailure(errorString); 522 callback->sendFailure(errorString);
523 return; 523 return;
524 } 524 }
525 callback->sendSuccess(content, base64Encoded); 525 callback->sendSuccess(content, base64Encoded);
526 } 526 }
527 527
528 void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri ng& frameId, const String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallbac k> callback) 528 void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri ng& frameId, const String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallbac k> callback)
529 { 529 {
530 String content; 530 String content;
531 if (m_debuggerAgent->getEditedScript(url, &content) || m_cssAgent->getEdited StyleSheet(url, &content)) { 531 if (m_cssAgent->getEditedStyleSheet(url, &content)) {
yurys 2015/07/16 16:30:35 Are you going to remove this one too?
dgozman 2015/07/17 14:39:16 In next patch if this one sticks.
532 callback->sendSuccess(content, false); 532 callback->sendSuccess(content, false);
533 return; 533 return;
534 } 534 }
535 if (!m_enabled) { 535 if (!m_enabled) {
536 callback->sendFailure("Agent is not enabled."); 536 callback->sendFailure("Agent is not enabled.");
537 return; 537 return;
538 } 538 }
539 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&Inspect orPageAgent::getResourceContentAfterResourcesContentLoaded, this, frameId, url, callback)); 539 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&Inspect orPageAgent::getResourceContentAfterResourcesContentLoaded, this, frameId, url, callback));
540 } 540 }
541 541
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 { 812 {
813 visitor->trace(m_inspectedFrame); 813 visitor->trace(m_inspectedFrame);
814 visitor->trace(m_debuggerAgent); 814 visitor->trace(m_debuggerAgent);
815 visitor->trace(m_cssAgent); 815 visitor->trace(m_cssAgent);
816 visitor->trace(m_overlay); 816 visitor->trace(m_overlay);
817 visitor->trace(m_inspectorResourceContentLoader); 817 visitor->trace(m_inspectorResourceContentLoader);
818 InspectorBaseAgent::trace(visitor); 818 InspectorBaseAgent::trace(visitor);
819 } 819 }
820 820
821 } // namespace blink 821 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698