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

Side by Side Diff: content/renderer/history_entry.cc

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: . Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 root_->CloneAndReplace(new_entry->weak_ptr_factory_.GetWeakPtr(), 167 root_->CloneAndReplace(new_entry->weak_ptr_factory_.GetWeakPtr(),
168 new_item, clone_children_of_target, target_frame, 168 new_item, clone_children_of_target, target_frame,
169 render_view->GetMainRenderFrame()); 169 render_view->GetMainRenderFrame());
170 return new_entry; 170 return new_entry;
171 } 171 }
172 172
173 HistoryEntry::HistoryNode* HistoryEntry::GetHistoryNodeForFrame( 173 HistoryEntry::HistoryNode* HistoryEntry::GetHistoryNodeForFrame(
174 RenderFrameImpl* frame) { 174 RenderFrameImpl* frame) {
175 if (!frame->GetWebFrame()->parent()) 175 if (!frame->GetWebFrame()->parent())
176 return root_history_node(); 176 return root_history_node();
177 return unique_names_to_items_[frame->GetWebFrame()->uniqueName().utf8()]; 177 return unique_names_to_items_[frame->unique_name()];
178 } 178 }
179 179
180 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) { 180 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) {
181 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame)) 181 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame))
182 return history_node->item(); 182 return history_node->item();
183 return WebHistoryItem(); 183 return WebHistoryItem();
184 } 184 }
185 185
186 } // namespace content 186 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698