mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
182 lines
4.3 KiB
Plaintext
182 lines
4.3 KiB
Plaintext
|
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||
|
# Use of this source code is governed by a BSD-style license that can be
|
||
|
# found in the LICENSE file.
|
||
|
|
||
|
import("//build/buildflag_header.gni")
|
||
|
import("//components/gcm_driver/config.gni")
|
||
|
|
||
|
buildflag_header("gcm_build_features") {
|
||
|
header = "gcm_build_features.h"
|
||
|
flags = [ "USE_GCM_FROM_PLATFORM=$use_gcm_from_platform" ]
|
||
|
}
|
||
|
|
||
|
static_library("gcm_driver") {
|
||
|
sources = [
|
||
|
"gcm_account_tracker.cc",
|
||
|
"gcm_account_tracker.h",
|
||
|
"gcm_activity.cc",
|
||
|
"gcm_activity.h",
|
||
|
"gcm_app_handler.cc",
|
||
|
"gcm_app_handler.h",
|
||
|
"gcm_backoff_policy.cc",
|
||
|
"gcm_backoff_policy.h",
|
||
|
"gcm_client.cc",
|
||
|
"gcm_client.h",
|
||
|
"gcm_connection_observer.cc",
|
||
|
"gcm_connection_observer.h",
|
||
|
"gcm_delayed_task_controller.cc",
|
||
|
"gcm_delayed_task_controller.h",
|
||
|
"gcm_driver.cc",
|
||
|
"gcm_driver.h",
|
||
|
"gcm_driver_constants.cc",
|
||
|
"gcm_driver_constants.h",
|
||
|
"gcm_internals_constants.cc",
|
||
|
"gcm_internals_constants.h",
|
||
|
"gcm_internals_helper.cc",
|
||
|
"gcm_internals_helper.h",
|
||
|
"gcm_profile_service.cc",
|
||
|
"gcm_profile_service.h",
|
||
|
"registration_info.cc",
|
||
|
"registration_info.h",
|
||
|
"system_encryptor.cc",
|
||
|
"system_encryptor.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//base",
|
||
|
"//components/gcm_driver/common",
|
||
|
"//components/gcm_driver/crypto",
|
||
|
"//components/gcm_driver/instance_id",
|
||
|
]
|
||
|
deps = [
|
||
|
":gcm_build_features",
|
||
|
"//base:i18n",
|
||
|
"//components/crx_file",
|
||
|
"//components/data_use_measurement/core",
|
||
|
"//components/keyed_service/core",
|
||
|
"//components/os_crypt",
|
||
|
"//components/pref_registry",
|
||
|
"//components/prefs",
|
||
|
"//components/signin/core/browser",
|
||
|
"//components/sync",
|
||
|
"//components/version_info",
|
||
|
"//google_apis",
|
||
|
"//google_apis/gcm",
|
||
|
"//net",
|
||
|
"//url:url",
|
||
|
]
|
||
|
|
||
|
# This target goes with these other deps and they can include headers from
|
||
|
# each other.
|
||
|
allow_circular_includes_from = [
|
||
|
"//components/gcm_driver/crypto",
|
||
|
"//components/gcm_driver/instance_id",
|
||
|
]
|
||
|
|
||
|
if (is_chromeos) {
|
||
|
deps += [ "//components/timers" ]
|
||
|
}
|
||
|
|
||
|
if (use_gcm_from_platform) {
|
||
|
sources += [
|
||
|
"gcm_driver_android.cc",
|
||
|
"gcm_driver_android.h",
|
||
|
"gcm_stats_recorder_android.cc",
|
||
|
"gcm_stats_recorder_android.h",
|
||
|
]
|
||
|
} else {
|
||
|
sources += [
|
||
|
"gcm_account_mapper.cc",
|
||
|
"gcm_account_mapper.h",
|
||
|
"gcm_channel_status_request.cc",
|
||
|
"gcm_channel_status_request.h",
|
||
|
"gcm_channel_status_syncer.cc",
|
||
|
"gcm_channel_status_syncer.h",
|
||
|
"gcm_client_factory.cc",
|
||
|
"gcm_client_factory.h",
|
||
|
"gcm_client_impl.cc",
|
||
|
"gcm_client_impl.h",
|
||
|
"gcm_desktop_utils.cc",
|
||
|
"gcm_desktop_utils.h",
|
||
|
"gcm_driver_desktop.cc",
|
||
|
"gcm_driver_desktop.h",
|
||
|
"gcm_stats_recorder_impl.cc",
|
||
|
"gcm_stats_recorder_impl.h",
|
||
|
]
|
||
|
deps += [
|
||
|
"//components/crx_file",
|
||
|
"//google_apis/gcm",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_android) {
|
||
|
deps += [ "android:jni_headers" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static_library("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"fake_gcm_app_handler.cc",
|
||
|
"fake_gcm_app_handler.h",
|
||
|
"fake_gcm_driver.cc",
|
||
|
"fake_gcm_driver.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
":gcm_driver",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//google_apis/gcm:test_support",
|
||
|
"//net",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
|
||
|
if (!use_gcm_from_platform) {
|
||
|
sources += [
|
||
|
"fake_gcm_client.cc",
|
||
|
"fake_gcm_client.h",
|
||
|
"fake_gcm_client_factory.cc",
|
||
|
"fake_gcm_client_factory.h",
|
||
|
]
|
||
|
deps += [ "//google_apis/gcm:test_support" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
source_set("unit_tests") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"gcm_account_tracker_unittest.cc",
|
||
|
"gcm_delayed_task_controller_unittest.cc",
|
||
|
"gcm_stats_recorder_android_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":gcm_driver",
|
||
|
":test_support",
|
||
|
"//base",
|
||
|
"//base/test:test_support",
|
||
|
"//components/gcm_driver/crypto",
|
||
|
"//components/prefs:test_support",
|
||
|
"//components/sync/protocol",
|
||
|
"//google_apis:test_support",
|
||
|
"//google_apis/gcm:test_support",
|
||
|
"//net:test_support",
|
||
|
"//testing/gtest",
|
||
|
"//third_party/leveldatabase",
|
||
|
"//third_party/protobuf:protobuf_lite",
|
||
|
]
|
||
|
|
||
|
if (!use_gcm_from_platform) {
|
||
|
sources += [
|
||
|
"gcm_account_mapper_unittest.cc",
|
||
|
"gcm_channel_status_request_unittest.cc",
|
||
|
"gcm_client_impl_unittest.cc",
|
||
|
"gcm_driver_desktop_unittest.cc",
|
||
|
"gcm_stats_recorder_impl_unittest.cc",
|
||
|
]
|
||
|
}
|
||
|
}
|