| # Copyright 2017 The Chromium Authors | 
 | # Use of this source code is governed by a BSD-style license that can be | 
 | # found in the LICENSE file. | 
 |  | 
 | import("//build/config/features.gni") | 
 |  | 
 | if (is_android) { | 
 |   import("//build/config/android/config.gni") | 
 |   import("//build/config/android/rules.gni") | 
 | } | 
 |  | 
 | component("public") { | 
 |   defines = [ "IS_COMPONENTS_DOWNLOAD_PUBLIC_BACKGROUND_SERVICE_IMPL" ] | 
 |  | 
 |   sources = [ | 
 |     "background_download_service.h", | 
 |     "client.cc", | 
 |     "client.h", | 
 |     "clients.cc", | 
 |     "clients.h", | 
 |     "download_metadata.cc", | 
 |     "download_metadata.h", | 
 |     "download_params.cc", | 
 |     "download_params.h", | 
 |     "features.cc", | 
 |     "features.h", | 
 |     "service_config.h", | 
 |   ] | 
 |  | 
 |   if (use_blink) { | 
 |     sources += [ | 
 |       "basic_task_scheduler.cc", | 
 |       "basic_task_scheduler.h", | 
 |       "blob_context_getter_factory.h", | 
 |       "logger.h", | 
 |       "navigation_monitor.h", | 
 |       "url_loader_factory_getter.h", | 
 |     ] | 
 |   } | 
 |  | 
 |   deps = [ | 
 |     "//build:blink_buildflags", | 
 |     "//components/keyed_service/core", | 
 |     "//services/network/public/mojom:url_loader_base", | 
 |   ] | 
 |  | 
 |   if (use_blink) { | 
 |     deps += [ "//storage/browser" ] | 
 |   } | 
 |  | 
 |   public_deps = [ | 
 |     "//base", | 
 |     "//net", | 
 |     "//url", | 
 |   ] | 
 |  | 
 |   if (use_blink) { | 
 |     public_deps += [ "//components/download/public/task:public" ] | 
 |   } else { | 
 |     public_deps += [ "//components/download/public/task:task_type" ] | 
 |   } | 
 |  | 
 |   configs += [ "//build/config/compiler:wexit_time_destructors" ] | 
 | } |