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/1150402
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578071}
diff --git a/components/download/internal/common/BUILD.gn b/components/download/internal/common/BUILD.gn
index 5121397..0f957ee 100644
--- a/components/download/internal/common/BUILD.gn
+++ b/components/download/internal/common/BUILD.gn
@@ -33,6 +33,7 @@
     "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",
diff --git a/content/browser/download/download_url_loader_factory_getter_impl.cc b/components/download/internal/common/download_url_loader_factory_getter_impl.cc
similarity index 84%
rename from content/browser/download/download_url_loader_factory_getter_impl.cc
rename to components/download/internal/common/download_url_loader_factory_getter_impl.cc
index e26386c..83c5b93 100644
--- a/content/browser/download/download_url_loader_factory_getter_impl.cc
+++ b/components/download/internal/common/download_url_loader_factory_getter_impl.cc
@@ -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 @@
   return url_loader_factory_;
 }
 
-}  // namespace content
+}  // namespace download
diff --git a/components/download/public/common/BUILD.gn b/components/download/public/common/BUILD.gn
index 5c8c871..6d3b1e9 100644
--- a/components/download/public/common/BUILD.gn
+++ b/components/download/public/common/BUILD.gn
@@ -46,6 +46,7 @@
     "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",
diff --git a/content/browser/download/download_url_loader_factory_getter_impl.h b/components/download/public/common/download_url_loader_factory_getter_impl.h
similarity index 74%
rename from content/browser/download/download_url_loader_factory_getter_impl.h
rename to components/download/public/common/download_url_loader_factory_getter_impl.h
index d002dbb..dcfb250 100644
--- a/content/browser/download/download_url_loader_factory_getter_impl.h
+++ b/components/download/public/common/download_url_loader_factory_getter_impl.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 @@
   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_
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 43e712c..d61a444 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -752,8 +752,6 @@
     "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",
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index a04987f..813b1b5 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.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 @@
   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 =