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

Unified Diff: chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc

Issue 2541063002: Revert of Remove about:srcdoc url conversion. (Closed)
Patch Set: Created 4 years 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
Index: chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
diff --git a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
index 2519c77975befbc745670dc1fc64d6bd9531188c..fe50acfe06243f0a44818817b06e449302e33baa 100644
--- a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
+++ b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
@@ -30,6 +30,7 @@
FrameNavigationState::FrameState::FrameState() {
error_occurred = false;
+ is_iframe_srcdoc = false;
is_loading = false;
is_parsing = false;
}
@@ -70,10 +71,13 @@
content::RenderFrameHost* frame_host,
const GURL& url,
bool is_same_page,
- bool is_error_page) {
+ bool is_error_page,
+ bool is_iframe_srcdoc) {
FrameState& frame_state = frame_host_state_map_[frame_host];
frame_state.error_occurred = is_error_page;
frame_state.url = url;
+ frame_state.is_iframe_srcdoc = is_iframe_srcdoc;
+ DCHECK(!is_iframe_srcdoc || url == url::kAboutBlankURL);
if (!is_same_page) {
frame_state.is_loading = true;
frame_state.is_parsing = true;
@@ -112,6 +116,8 @@
if (it == frame_host_state_map_.end())
return GURL();
+ if (it->second.is_iframe_srcdoc)
+ return GURL(content::kAboutSrcDocURL);
return it->second.url;
}

Powered by Google App Engine
This is Rietveld 408576698