| Index: chrome/browser/extensions/tab_helper.cc
|
| diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
|
| index db27af954d9d819fc70925105e29c416e54434bb..34be9d5e9095fd2baa83ec64fbc4ae3a68a9a430 100644
|
| --- a/chrome/browser/extensions/tab_helper.cc
|
| +++ b/chrome/browser/extensions/tab_helper.cc
|
| @@ -40,6 +40,7 @@
|
| #include "content/public/browser/navigation_controller.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/notification_types.h"
|
| @@ -47,6 +48,7 @@
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/common/browser_side_navigation_policy.h"
|
| #include "content/public/common/frame_navigate_params.h"
|
| #include "extensions/browser/api/declarative/rules_registry_service.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| @@ -62,6 +64,7 @@
|
| #include "extensions/common/extension_urls.h"
|
| #include "extensions/common/feature_switch.h"
|
| #include "extensions/common/manifest_handlers/icons_handler.h"
|
| +#include "net/http/http_response_headers.h"
|
| #include "url/url_constants.h"
|
|
|
| #if defined(OS_WIN)
|
| @@ -312,6 +315,17 @@ void TabHelper::RenderFrameCreated(content::RenderFrameHost* host) {
|
| SetTabId(host);
|
| }
|
|
|
| +void TabHelper::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (content::IsBrowserSideNavigationEnabled() &&
|
| + navigation_handle->GetResponseHeaders() &&
|
| + (navigation_handle->GetResponseHeaders()->response_code() == 204 ||
|
| + navigation_handle->GetResponseHeaders()->response_code() == 205)) {
|
| + content::RenderFrameHost* rfh = navigation_handle->GetRenderFrameHost();
|
| + rfh->Send(new ExtensionMsg_Set204Or205Error(rfh->GetRoutingID()));
|
| + }
|
| +}
|
| +
|
| void TabHelper::DidNavigateMainFrame(
|
| const content::LoadCommittedDetails& details,
|
| const content::FrameNavigateParams& params) {
|
|
|