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

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

Issue 580133002: Update entry page type to include error pages when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address suggestions. Created 6 years, 2 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
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 &url, browser_context_, &needs_update); 1053 &url, browser_context_, &needs_update);
1054 new_entry->set_update_virtual_url_with_url(needs_update); 1054 new_entry->set_update_virtual_url_with_url(needs_update);
1055 1055
1056 // When navigating to a new page, give the browser URL handler a chance to 1056 // When navigating to a new page, give the browser URL handler a chance to
1057 // update the virtual URL based on the new URL. For example, this is needed 1057 // update the virtual URL based on the new URL. For example, this is needed
1058 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes 1058 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes
1059 // the URL. 1059 // the URL.
1060 update_virtual_url = needs_update; 1060 update_virtual_url = needs_update;
1061 } 1061 }
1062 1062
1063 if (params.url_is_unreachable)
1064 new_entry->set_page_type(PAGE_TYPE_ERROR);
1063 new_entry->SetURL(params.url); 1065 new_entry->SetURL(params.url);
1064 if (update_virtual_url) 1066 if (update_virtual_url)
1065 UpdateVirtualURLToURL(new_entry, params.url); 1067 UpdateVirtualURLToURL(new_entry, params.url);
1066 new_entry->SetReferrer(params.referrer); 1068 new_entry->SetReferrer(params.referrer);
1067 new_entry->SetPageID(params.page_id); 1069 new_entry->SetPageID(params.page_id);
1068 new_entry->SetTransitionType(params.transition); 1070 new_entry->SetTransitionType(params.transition);
1069 new_entry->set_site_instance( 1071 new_entry->set_site_instance(
1070 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance())); 1072 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance()));
1071 new_entry->SetHasPostData(params.is_post); 1073 new_entry->SetHasPostData(params.is_post);
1072 new_entry->SetPostID(params.post_id); 1074 new_entry->SetPostID(params.post_id);
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 } 1790 }
1789 } 1791 }
1790 } 1792 }
1791 1793
1792 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 1794 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
1793 const base::Callback<base::Time()>& get_timestamp_callback) { 1795 const base::Callback<base::Time()>& get_timestamp_callback) {
1794 get_timestamp_callback_ = get_timestamp_callback; 1796 get_timestamp_callback_ = get_timestamp_callback;
1795 } 1797 }
1796 1798
1797 } // namespace content 1799 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698