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

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

Issue 2327083002: Ntp: restore scroll position. (Closed)
Patch Set: fix build (const) 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 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/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 bool NavigationEntryImpl::GetExtraData(const std::string& key, 575 bool NavigationEntryImpl::GetExtraData(const std::string& key,
576 base::string16* data) const { 576 base::string16* data) const {
577 std::map<std::string, base::string16>::const_iterator iter = 577 std::map<std::string, base::string16>::const_iterator iter =
578 extra_data_.find(key); 578 extra_data_.find(key);
579 if (iter == extra_data_.end()) 579 if (iter == extra_data_.end())
580 return false; 580 return false;
581 *data = iter->second; 581 *data = iter->second;
582 return true; 582 return true;
583 } 583 }
584 584
585 const std::map<std::string, base::string16>& NavigationEntryImpl::GetExtraData()
586 const {
587 return extra_data_;
588 }
589
585 void NavigationEntryImpl::ClearExtraData(const std::string& key) { 590 void NavigationEntryImpl::ClearExtraData(const std::string& key) {
586 extra_data_.erase(key); 591 extra_data_.erase(key);
587 } 592 }
588 593
589 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const { 594 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const {
590 return NavigationEntryImpl::CloneAndReplace(nullptr, false, nullptr, nullptr); 595 return NavigationEntryImpl::CloneAndReplace(nullptr, false, nullptr, nullptr);
591 } 596 }
592 597
593 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace( 598 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace(
594 FrameNavigationEntry* frame_navigation_entry, 599 FrameNavigationEntry* frame_navigation_entry,
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 return node; 911 return node;
907 912
908 // Enqueue any children and keep looking. 913 // Enqueue any children and keep looking.
909 for (auto* child : node->children) 914 for (auto* child : node->children)
910 work_queue.push(child); 915 work_queue.push(child);
911 } 916 }
912 return nullptr; 917 return nullptr;
913 } 918 }
914 919
915 } // namespace content 920 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698