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

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

Issue 1153763002: Hardening the 'url::Origin' implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More. Created 5 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 current_url_ = GURL(); 133 current_url_ = GURL();
134 134
135 // The children may not have been cleared if a cross-process navigation 135 // The children may not have been cleared if a cross-process navigation
136 // commits before the old process cleans everything up. Make sure the child 136 // commits before the old process cleans everything up. Make sure the child
137 // nodes get deleted before swapping to a new process. 137 // nodes get deleted before swapping to a new process.
138 ScopedVector<FrameTreeNode> old_children = children_.Pass(); 138 ScopedVector<FrameTreeNode> old_children = children_.Pass();
139 old_children.clear(); // May notify observers. 139 old_children.clear(); // May notify observers.
140 } 140 }
141 141
142 void FrameTreeNode::SetCurrentOrigin(const url::Origin& origin) { 142 void FrameTreeNode::SetCurrentOrigin(const url::Origin& origin) {
143 if (!origin.IsSameAs(replication_state_.origin)) 143 if (!origin.IsSameOriginWith(replication_state_.origin))
144 render_manager_.OnDidUpdateOrigin(origin); 144 render_manager_.OnDidUpdateOrigin(origin);
145 replication_state_.origin = origin; 145 replication_state_.origin = origin;
146 } 146 }
147 147
148 void FrameTreeNode::SetFrameName(const std::string& name) { 148 void FrameTreeNode::SetFrameName(const std::string& name) {
149 if (name != replication_state_.name) 149 if (name != replication_state_.name)
150 render_manager_.OnDidUpdateName(name); 150 render_manager_.OnDidUpdateName(name);
151 replication_state_.name = name; 151 replication_state_.name = name;
152 } 152 }
153 153
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 FROM_HERE_WITH_EXPLICIT_FUNCTION( 300 FROM_HERE_WITH_EXPLICIT_FUNCTION(
301 "465796 FrameTreeNode::DidStopLoading::End")); 301 "465796 FrameTreeNode::DidStopLoading::End"));
302 } 302 }
303 303
304 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { 304 void FrameTreeNode::DidChangeLoadProgress(double load_progress) {
305 loading_progress_ = load_progress; 305 loading_progress_ = load_progress;
306 frame_tree_->UpdateLoadProgress(); 306 frame_tree_->UpdateLoadProgress();
307 } 307 }
308 308
309 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/renderer_host/websocket_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698