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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2329523003: Main frame's unique name can always be null. (Closed)
Patch Set: Addressed CR feedback from dcheng@. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6aabf786c74fc3c2979ebaf2c4bcde724c3023cb..8b80ed427074141e85e7102b09aff596560c512f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1538,9 +1538,9 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
params.main_frame_routing_id,
main_frame_widget_routing_id);
- // blink::FrameTree::setName uses |name| as the |unique_name| for the main
- // frame - let's do the same thing here.
- std::string unique_name = params.main_frame_name;
+ // blink::FrameTree::setName always keeps |unique_name| empty in case of a
+ // main frame - let's do the same thing here.
+ std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
WebContentsViewDelegate* delegate =

Powered by Google App Engine
This is Rietveld 408576698