From 7d326f6bc524743881675e1bfa2f3a00874c6ca2 Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 5 Jun 2019 12:49:05 -0700 Subject: [PATCH] chore: Remove AtomResourceDispatcherHostDelegate (#18623) It is no longer used, follow up for https://chromium-review.googlesource.com/c/chromium/src/+/1610892 --- atom/browser/atom_browser_client.cc | 9 ------ atom/browser/atom_browser_client.h | 5 --- .../atom_resource_dispatcher_host_delegate.cc | 32 ------------------- .../atom_resource_dispatcher_host_delegate.h | 25 --------------- filenames.gni | 2 -- 5 files changed, 73 deletions(-) delete mode 100644 atom/browser/atom_resource_dispatcher_host_delegate.cc delete mode 100644 atom/browser/atom_resource_dispatcher_host_delegate.h diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 787c42882659..f8ba3a095e41 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -21,7 +21,6 @@ #include "atom/browser/atom_navigation_throttle.h" #include "atom/browser/atom_paths.h" #include "atom/browser/atom_quota_permission_context.h" -#include "atom/browser/atom_resource_dispatcher_host_delegate.h" #include "atom/browser/atom_speech_recognition_manager_delegate.h" #include "atom/browser/child_web_contents_tracker.h" #include "atom/browser/font_defaults.h" @@ -62,7 +61,6 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/resource_dispatcher_host.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_paths.h" @@ -591,13 +589,6 @@ void AtomBrowserClient::SelectClientCertificate( } } -void AtomBrowserClient::ResourceDispatcherHostCreated() { - resource_dispatcher_host_delegate_.reset( - new AtomResourceDispatcherHostDelegate); - content::ResourceDispatcherHost::Get()->SetDelegate( - resource_dispatcher_host_delegate_.get()); -} - bool AtomBrowserClient::CanCreateWindow( content::RenderFrameHost* opener, const GURL& opener_url, diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 2dd3901cdcbc..a29c5dbdd162 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -27,7 +27,6 @@ class SSLCertRequestInfo; namespace atom { -class AtomResourceDispatcherHostDelegate; class NotificationPresenter; class PlatformNotificationService; @@ -115,7 +114,6 @@ class AtomBrowserClient : public content::ContentBrowserClient, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList client_certs, std::unique_ptr delegate) override; - void ResourceDispatcherHostCreated() override; bool CanCreateWindow(content::RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, @@ -242,9 +240,6 @@ class AtomBrowserClient : public content::ContentBrowserClient, // list of site per affinity. weak_ptr to prevent instance locking std::map site_per_affinities_; - std::unique_ptr - resource_dispatcher_host_delegate_; - std::unique_ptr notification_service_; std::unique_ptr notification_presenter_; diff --git a/atom/browser/atom_resource_dispatcher_host_delegate.cc b/atom/browser/atom_resource_dispatcher_host_delegate.cc deleted file mode 100644 index b7e3a994bb3d..000000000000 --- a/atom/browser/atom_resource_dispatcher_host_delegate.cc +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#include "atom/browser/atom_resource_dispatcher_host_delegate.h" - -#include "atom/browser/atom_browser_context.h" -#include "atom/browser/web_contents_preferences.h" -#include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" -#include "content/public/browser/browser_task_traits.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/browser/download_manager.h" -#include "content/public/browser/render_frame_host.h" -#include "electron/buildflags/buildflags.h" -#include "net/base/escape.h" -#include "url/gurl.h" - -#if BUILDFLAG(ENABLE_PDF_VIEWER) -#include "atom/common/atom_constants.h" -#include "base/strings/stringprintf.h" -#include "content/public/browser/stream_info.h" -#include "net/url_request/url_request.h" -#endif // BUILDFLAG(ENABLE_PDF_VIEWER) - -using content::BrowserThread; - -namespace atom { - -AtomResourceDispatcherHostDelegate::AtomResourceDispatcherHostDelegate() {} - -} // namespace atom diff --git a/atom/browser/atom_resource_dispatcher_host_delegate.h b/atom/browser/atom_resource_dispatcher_host_delegate.h deleted file mode 100644 index 6da5f837bf12..000000000000 --- a/atom/browser/atom_resource_dispatcher_host_delegate.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ATOM_BROWSER_ATOM_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ -#define ATOM_BROWSER_ATOM_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ - -#include - -#include "content/public/browser/resource_dispatcher_host_delegate.h" - -namespace atom { - -class AtomResourceDispatcherHostDelegate - : public content::ResourceDispatcherHostDelegate { - public: - AtomResourceDispatcherHostDelegate(); - - private: - DISALLOW_COPY_AND_ASSIGN(AtomResourceDispatcherHostDelegate); -}; - -} // namespace atom - -#endif // ATOM_BROWSER_ATOM_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ diff --git a/filenames.gni b/filenames.gni index fcaa0cf2b38c..901ede6cf352 100644 --- a/filenames.gni +++ b/filenames.gni @@ -150,8 +150,6 @@ filenames = { "atom/browser/atom_permission_manager.h", "atom/browser/atom_quota_permission_context.cc", "atom/browser/atom_quota_permission_context.h", - "atom/browser/atom_resource_dispatcher_host_delegate.cc", - "atom/browser/atom_resource_dispatcher_host_delegate.h", "atom/browser/atom_speech_recognition_manager_delegate.cc", "atom/browser/atom_speech_recognition_manager_delegate.h", "atom/browser/atom_web_ui_controller_factory.cc",