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

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

Issue 2327083002: Ntp: restore scroll position. (Closed)
Patch Set: Cleanups. 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 void NavigationEntryImpl::GetExtraData(
586 std::map<std::string, base::string16>* data) {
587 for (const auto& entry : extra_data_)
588 (*data)[entry.first] = entry.second;
589 }
590
585 void NavigationEntryImpl::ClearExtraData(const std::string& key) { 591 void NavigationEntryImpl::ClearExtraData(const std::string& key) {
586 extra_data_.erase(key); 592 extra_data_.erase(key);
587 } 593 }
588 594
589 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const { 595 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const {
590 return NavigationEntryImpl::CloneAndReplace(nullptr, false, nullptr, nullptr); 596 return NavigationEntryImpl::CloneAndReplace(nullptr, false, nullptr, nullptr);
591 } 597 }
592 598
593 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace( 599 std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace(
594 FrameNavigationEntry* frame_navigation_entry, 600 FrameNavigationEntry* frame_navigation_entry,
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 return node; 912 return node;
907 913
908 // Enqueue any children and keep looking. 914 // Enqueue any children and keep looking.
909 for (auto* child : node->children) 915 for (auto* child : node->children)
910 work_queue.push(child); 916 work_queue.push(child);
911 } 917 }
912 return nullptr; 918 return nullptr;
913 } 919 }
914 920
915 } // namespace content 921 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698