| OLD | NEW |
| 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_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" // Temporary | 10 #include "base/strings/string_number_conversions.h" // Temporary |
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 | 1398 |
| 1399 void NavigationControllerImpl::SetMaxRestoredPageID(int32 max_id) { | 1399 void NavigationControllerImpl::SetMaxRestoredPageID(int32 max_id) { |
| 1400 max_restored_page_id_ = max_id; | 1400 max_restored_page_id_ = max_id; |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 int32 NavigationControllerImpl::GetMaxRestoredPageID() const { | 1403 int32 NavigationControllerImpl::GetMaxRestoredPageID() const { |
| 1404 return max_restored_page_id_; | 1404 return max_restored_page_id_; |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 bool NavigationControllerImpl::IsUnmodifiedBlankTab() const { | 1407 bool NavigationControllerImpl::IsUnmodifiedBlankTab() const { |
| 1408 // TODO(creis): Move has_accessed_initial_document from RenderViewHost to | |
| 1409 // WebContents and NavigationControllerDelegate. | |
| 1410 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( | |
| 1411 delegate_->GetRenderViewHost()); | |
| 1412 return IsInitialNavigation() && | 1408 return IsInitialNavigation() && |
| 1413 !GetLastCommittedEntry() && | 1409 !GetLastCommittedEntry() && |
| 1414 !rvh->has_accessed_initial_document(); | 1410 !delegate_->HasAccessedInitialDocument(); |
| 1415 } | 1411 } |
| 1416 | 1412 |
| 1417 SessionStorageNamespace* | 1413 SessionStorageNamespace* |
| 1418 NavigationControllerImpl::GetSessionStorageNamespace(SiteInstance* instance) { | 1414 NavigationControllerImpl::GetSessionStorageNamespace(SiteInstance* instance) { |
| 1419 std::string partition_id; | 1415 std::string partition_id; |
| 1420 if (instance) { | 1416 if (instance) { |
| 1421 // TODO(ajwong): When GetDefaultSessionStorageNamespace() goes away, remove | 1417 // TODO(ajwong): When GetDefaultSessionStorageNamespace() goes away, remove |
| 1422 // this if statement so |instance| must not be NULL. | 1418 // this if statement so |instance| must not be NULL. |
| 1423 partition_id = | 1419 partition_id = |
| 1424 GetContentClient()->browser()->GetStoragePartitionIdForSite( | 1420 GetContentClient()->browser()->GetStoragePartitionIdForSite( |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 } | 1739 } |
| 1744 } | 1740 } |
| 1745 } | 1741 } |
| 1746 | 1742 |
| 1747 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1743 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 1748 const base::Callback<base::Time()>& get_timestamp_callback) { | 1744 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 1749 get_timestamp_callback_ = get_timestamp_callback; | 1745 get_timestamp_callback_ = get_timestamp_callback; |
| 1750 } | 1746 } |
| 1751 | 1747 |
| 1752 } // namespace content | 1748 } // namespace content |
| OLD | NEW |