| Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
|
| diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
|
| index 6ce004363506e563ed12022857eae326f71ec738..73f71701fabb09176807b756ea6073df35188aa0 100644
|
| --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
|
| +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
|
| @@ -659,6 +659,8 @@ void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame(
|
|
|
| bool is_reference_fragment_navigation =
|
| IsReferenceFragmentNavigation(frame_id, url);
|
| + bool is_history_navigation =
|
| + navigation_state_.GetNavigationCommitted(frame_id);
|
|
|
| // Update the URL as it might have changed.
|
| navigation_state_.UpdateFrame(frame_id, url);
|
| @@ -673,6 +675,18 @@ void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame(
|
| url,
|
| transition_type);
|
| navigation_state_.SetNavigationCompleted(frame_id);
|
| + } else if (is_history_navigation) {
|
| + // Make the transition type match the one for reference fragment updates.
|
| + transition_type = static_cast<content::PageTransition>(
|
| + transition_type | content::PAGE_TRANSITION_CLIENT_REDIRECT);
|
| + DispatchOnCommitted(
|
| + keys::kOnHistoryStateUpdated,
|
| + web_contents(),
|
| + frame_id,
|
| + is_main_frame,
|
| + url,
|
| + transition_type);
|
| + navigation_state_.SetNavigationCompleted(frame_id);
|
| } else {
|
| if (navigation_state_.GetIsServerRedirected(frame_id)) {
|
| transition_type = static_cast<content::PageTransition>(
|
|
|