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

Unified Diff: content/renderer/savable_resources.cc

Issue 1422473004: Vector-of-structs (instead of struct-of-vectors) in "savable resources" IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-original-url-yay
Patch Set: Rebasing... Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/savable_resources.h ('k') | content/renderer/savable_resources_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/savable_resources.cc
diff --git a/content/renderer/savable_resources.cc b/content/renderer/savable_resources.cc
index ddbcc6cf02d0a6b1438bc6cb53025cc8f1f64f6e..d2d28f96c40fbc312e13d9599adb627e09d4541b 100644
--- a/content/renderer/savable_resources.cc
+++ b/content/renderer/savable_resources.cc
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "content/renderer/web_frame_utils.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -43,10 +44,14 @@ void GetSavableResourceLinkForElement(
const WebDocument& current_doc,
SavableResourcesResult* result) {
if (element.hasHTMLTagName("iframe") || element.hasHTMLTagName("frame")) {
- GURL original_url = current_doc.completeURL(element.getAttribute("src"));
- WebFrame* subframe = WebFrame::fromFrameOwnerElement(element);
+ GURL complete_url = current_doc.completeURL(element.getAttribute("src"));
+ WebFrame* web_frame = WebFrame::fromFrameOwnerElement(element);
+
+ SavableSubframe subframe;
+ subframe.original_url = complete_url;
+ subframe.routing_id = GetRoutingIdForFrameOrProxy(web_frame);
+
result->subframes->push_back(subframe);
- result->subframe_original_urls->push_back(original_url);
return;
}
« no previous file with comments | « content/renderer/savable_resources.h ('k') | content/renderer/savable_resources_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698