Home | History | Annotate | Download | only in domain_reliability
      1 # Copyright 2014 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 action("bake_in_configs") {
      6   visibility = [ ":*" ]
      7   script = "bake_in_configs.py"
      8 
      9   inputs = [
     10     "baked_in_configs/accounts_google_com.json",
     11     "baked_in_configs/ad_doubleclick_net.json",
     12     "baked_in_configs/apis_google_com.json",
     13     "baked_in_configs/c_admob_com.json",
     14     "baked_in_configs/clients2_google_com.json",
     15     "baked_in_configs/csi_gstatic_com.json",
     16     "baked_in_configs/ddm_google_com.json",
     17     "baked_in_configs/docs_google_com.json",
     18     "baked_in_configs/drive_google_com.json",
     19     "baked_in_configs/e_admob_com.json",
     20     "baked_in_configs/fonts_googleapis_com.json",
     21     "baked_in_configs/googleads4_g_doubleclick_net.json",
     22     "baked_in_configs/googleads_g_doubleclick_net.json",
     23     "baked_in_configs/gstatic_com.json",
     24     "baked_in_configs/lh3_ggpht_com.json",
     25     "baked_in_configs/lh4_ggpht_com.json",
     26     "baked_in_configs/lh5_ggpht_com.json",
     27     "baked_in_configs/lh6_ggpht_com.json",
     28     "baked_in_configs/mail_google_com.json",
     29     "baked_in_configs/media_admob_com.json",
     30     "baked_in_configs/pagead2_googlesyndication_com.json",
     31     "baked_in_configs/partner_googleadservices_com.json",
     32     "baked_in_configs/pubads_g_doubleclick_net.json",
     33     "baked_in_configs/redirector_googlevideo_com.json",
     34     "baked_in_configs/s0_2mdn_net.json",
     35     "baked_in_configs/ssl_gstatic_com.json",
     36     "baked_in_configs/star_admob_com.json",
     37     "baked_in_configs/star_doubleclick_net.json",
     38     "baked_in_configs/star_g_doubleclick_net.json",
     39     "baked_in_configs/star_ggpht_com.json",
     40     "baked_in_configs/star_google_cn.json",
     41     "baked_in_configs/star_google_co_uk.json",
     42     "baked_in_configs/star_google_com.json",
     43     "baked_in_configs/star_google_com_au.json",
     44     "baked_in_configs/star_google_de.json",
     45     "baked_in_configs/star_google_fr.json",
     46     "baked_in_configs/star_google_it.json",
     47     "baked_in_configs/star_google_jp.json",
     48     "baked_in_configs/star_google_org.json",
     49     "baked_in_configs/star_google_ru.json",
     50     "baked_in_configs/star_googleadservices_com.json",
     51     "baked_in_configs/star_googleapis_com.json",
     52     "baked_in_configs/star_googlesyndication_com.json",
     53     "baked_in_configs/star_googleusercontent_com.json",
     54     "baked_in_configs/star_googlevideo_com.json",
     55     "baked_in_configs/star_gstatic_com.json",
     56     "baked_in_configs/star_gvt1_com.json",
     57     "baked_in_configs/star_youtube_com.json",
     58     "baked_in_configs/star_ytimg_com.json",
     59     "baked_in_configs/t0_gstatic_com.json",
     60     "baked_in_configs/t1_gstatic_com.json",
     61     "baked_in_configs/t2_gstatic_com.json",
     62     "baked_in_configs/t3_gstatic_com.json",
     63     "baked_in_configs/themes_googleusercontent_com.json",
     64     "baked_in_configs/www_google_com.json",
     65     "baked_in_configs/www_googleadservices_com.json",
     66     "baked_in_configs/www_gstatic_com.json",
     67     "baked_in_configs/www_youtube_com.json",
     68   ]
     69   outputs = [
     70     "$target_gen_dir/baked_in_configs.cc",
     71   ]
     72 
     73   args = rebase_path(inputs, root_build_dir) +
     74          rebase_path(outputs, root_build_dir)
     75 }
     76 
     77 component("domain_reliability") {
     78   sources = [
     79     "baked_in_configs.h",
     80     "beacon.cc",
     81     "beacon.h",
     82     "clear_mode.h",
     83     "config.cc",
     84     "config.h",
     85     "context.cc",
     86     "context.h",
     87     "dispatcher.cc",
     88     "dispatcher.h",
     89     "domain_reliability_export.h",
     90     "monitor.cc",
     91     "monitor.h",
     92     "scheduler.cc",
     93     "scheduler.h",
     94     "service.cc",
     95     "service.h",
     96     "uploader.cc",
     97     "uploader.h",
     98     "util.cc",
     99     "util.h",
    100   ]
    101   sources += get_target_outputs(":bake_in_configs")
    102 
    103   defines = [ "DOMAIN_RELIABILITY_IMPLEMENTATION" ]
    104 
    105   deps = [
    106     ":bake_in_configs",
    107     "//base",
    108     "//components/keyed_service/core",
    109     "//content/public/browser",
    110     "//net",
    111     "//url",
    112   ]
    113 }
    114 
    115 source_set("unit_tests") {
    116   testonly = true
    117   sources = [
    118     "config_unittest.cc",
    119     "context_unittest.cc",
    120     "dispatcher_unittest.cc",
    121     "monitor_unittest.cc",
    122     "scheduler_unittest.cc",
    123     "test_util.cc",
    124     "test_util.h",
    125     "uploader_unittest.cc",
    126     "util_unittest.cc",
    127   ]
    128 
    129   deps = [
    130     ":domain_reliability",
    131     "//testing/gtest",
    132   ]
    133 }
    134