Chromium Code Reviews| Index: chrome/browser/ui/webui/extensions/extension_loader_handler.cc |
| diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc |
| index 55bfe743371ab1be6f7150e86a060d77fa1bebfa..10f7a81f5ccee09aa89f0b6436dae7f2680f2e7a 100644 |
| --- a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc |
| +++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/grit/generated_resources.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/navigation_handle.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_ui.h" |
| #include "content/public/browser/web_ui_data_source.h" |
| @@ -169,14 +170,18 @@ void ExtensionLoaderHandler::OnLoadFailure( |
| line)); |
| } |
| -void ExtensionLoaderHandler::DidStartNavigationToPendingEntry( |
| - const GURL& url, |
| - content::ReloadType reload_type) { |
| +void ExtensionLoaderHandler::ReadyToCommitNavigation( |
|
Devlin
2017/01/21 02:01:17
The cheatsheet linked in the bug and the comments
jam
2017/01/21 05:30:56
Generally that's the replacement. In this case, th
jam
2017/01/21 07:17:54
actually, turns out that my change for ContentFavi
|
| + content::NavigationHandle* navigation_handle) { |
| + if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) |
|
Devlin
2017/01/21 02:01:17
Why do we need the IsInMainFrame() check? And won
jam
2017/01/21 05:30:56
To keep the same behavior as before, since DidStar
|
| + return; |
| + |
| // In the event of a page reload, we ensure that the frontend is not notified |
| // until the UI finishes loading, so we set |ui_ready_| to false. This is |
| // balanced in HandleDisplayFailures, which is called when the frontend is |
| // ready to receive failure notifications. |
| - if (reload_type != content::ReloadType::NONE) |
| + bool is_reload = ui::PageTransitionCoreTypeIs( |
| + navigation_handle->GetPageTransition(), ui::PAGE_TRANSITION_RELOAD); |
| + if (is_reload) |
| ui_ready_ = false; |
| } |