Commit 71a13fc6 authored by Min Qin's avatar Min Qin Committed by Commit Bot

Move DownloadUrlLoaderFactoryGetterImpl from content/ to components/

There are no dependencies in content/ for this class.
Moving it to components/ so it can be used in chrome/ layer for servicification.

BUG=695115

Change-Id: If37805b71ef588bbaaa7035eecb16c5cbc4a75b6
Reviewed-on: https://chromium-review.googlesource.com/1150402Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578071}
parent ef70c85e
......@@ -33,6 +33,7 @@ source_set("internal") {
"download_task_runner.cc",
"download_ukm_helper.cc",
"download_url_loader_factory_getter.cc",
"download_url_loader_factory_getter_impl.cc",
"download_utils.cc",
"download_worker.cc",
"download_worker.h",
......
......@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/download/download_url_loader_factory_getter_impl.h"
#include "components/download/public/common/download_url_loader_factory_getter_impl.h"
namespace content {
namespace download {
DownloadURLLoaderFactoryGetterImpl::DownloadURLLoaderFactoryGetterImpl(
std::unique_ptr<network::SharedURLLoaderFactoryInfo> url_loader_factory)
......@@ -22,4 +22,4 @@ DownloadURLLoaderFactoryGetterImpl::GetURLLoaderFactory() {
return url_loader_factory_;
}
} // namespace content
} // namespace download
......@@ -46,6 +46,7 @@ component("public") {
"download_task_runner.h",
"download_ukm_helper.h",
"download_url_loader_factory_getter.h",
"download_url_loader_factory_getter_impl.h",
"download_url_parameters.cc",
"download_url_parameters.h",
"download_utils.h",
......
......@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
#ifndef COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
#define COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
#include "components/download/public/common/download_url_loader_factory_getter.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace content {
namespace download {
// Class for retrieving a fixed SharedURLLoaderFactory.
class DownloadURLLoaderFactoryGetterImpl
: public download::DownloadURLLoaderFactoryGetter {
class COMPONENTS_DOWNLOAD_EXPORT DownloadURLLoaderFactoryGetterImpl
: public DownloadURLLoaderFactoryGetter {
public:
explicit DownloadURLLoaderFactoryGetterImpl(
std::unique_ptr<network::SharedURLLoaderFactoryInfo> url_loader_factory);
......@@ -34,6 +34,6 @@ class DownloadURLLoaderFactoryGetterImpl
DISALLOW_COPY_AND_ASSIGN(DownloadURLLoaderFactoryGetterImpl);
};
} // namespace content
} // namespace download
#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
#endif // COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_URL_LOADER_FACTORY_GETTER_IMPL_H_
......@@ -752,8 +752,6 @@ jumbo_source_set("browser") {
"download/download_request_utils.cc",
"download/download_resource_handler.cc",
"download/download_resource_handler.h",
"download/download_url_loader_factory_getter_impl.cc",
"download/download_url_loader_factory_getter_impl.h",
"download/download_utils.cc",
"download/download_utils.h",
"download/drag_download_file.cc",
......
......@@ -33,6 +33,7 @@
#include "components/download/public/common/download_stats.h"
#include "components/download/public/common/download_task_runner.h"
#include "components/download/public/common/download_url_loader_factory_getter.h"
#include "components/download/public/common/download_url_loader_factory_getter_impl.h"
#include "components/download/public/common/download_url_parameters.h"
#include "components/download/public/common/download_utils.h"
#include "components/download/public/common/url_download_handler_factory.h"
......@@ -41,7 +42,6 @@
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
#include "content/browser/download/byte_stream_input_stream.h"
#include "content/browser/download/download_resource_handler.h"
#include "content/browser/download/download_url_loader_factory_getter_impl.h"
#include "content/browser/download/download_utils.h"
#include "content/browser/download/file_download_url_loader_factory_getter.h"
#include "content/browser/download/file_system_download_url_loader_factory_getter.h"
......@@ -1131,7 +1131,7 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
if (blob_url_loader_factory) {
DCHECK(params->url().SchemeIsBlob());
url_loader_factory_getter =
base::MakeRefCounted<DownloadURLLoaderFactoryGetterImpl>(
base::MakeRefCounted<download::DownloadURLLoaderFactoryGetterImpl>(
blob_url_loader_factory->Clone());
} else if (params->url().SchemeIsFile()) {
url_loader_factory_getter =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment