Move //google_apis/drive into its own target and update clients
The reason we're now splitting this module into its own target is to avoid dependency cycles when migrating certain bits to the Identity service: since AuthService lives in google_apis/drive, we can't port it to the IdentityManager without incurring in a cycle caused by the identity service depending on the signin component which, in turn, depends again on google_apis. Note that we now need to make some GN targets under chrome/browser directly depend on //google_apis/drive as well in order to prevent build failures caused from happening because of such targets including headers files from //google_apis/drive. This was not required before doing this split since those targets would implicitly pull //google_apis through some of their direct dependencies' public_deps anyway. However, the new //google_apis/drive target is not listed as a public_dep anywhere, and so explicitly depending on it from those places is now required. Making this change now allows us to break the cycle since the signin component does not depend on anything in google_apis/drive, allowing us to reimplement AuthService in terms of the IdentityManager. Bug: 809440 Change-Id: Iec117d39beb073a094c180a1d855b7f33353e0b2 Reviewed-on: https://chromium-review.googlesource.com/c/1273074 Commit-Queue: Mario Sanchez Prada <mario@igalia.com> Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Reviewed-by: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#600749}
This commit is contained in:

committed by
Commit Bot

parent
d26f5c5000
commit
fdda9f6496
@ -3990,6 +3990,7 @@ jumbo_split_static_library("browser") {
|
||||
"//components/drive",
|
||||
"//components/guest_view/browser",
|
||||
"//extensions/components/javascript_dialog_extensions_client",
|
||||
"//google_apis/drive",
|
||||
"//media/cast:net",
|
||||
"//services/device/public/mojom",
|
||||
]
|
||||
@ -5307,6 +5308,7 @@ static_library("test_support") {
|
||||
"//components/drive:test_support",
|
||||
"//components/storage_monitor:test_support",
|
||||
"//extensions:test_support",
|
||||
"//google_apis:test_support",
|
||||
"//services/data_decoder/public/cpp:test_support",
|
||||
]
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ source_set("chromeos") {
|
||||
"//components/ukm/content",
|
||||
"//components/user_manager",
|
||||
"//components/viz/host",
|
||||
"//google_apis/drive",
|
||||
"//services/identity/public/cpp",
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
"//services/resource_coordinator/public/cpp:resource_coordinator_cpp",
|
||||
@ -2008,6 +2009,7 @@ static_library("test_support") {
|
||||
"//components/policy/proto",
|
||||
"//crypto:platform",
|
||||
"//google_apis",
|
||||
"//google_apis/drive:test_support",
|
||||
"//skia",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
@ -2446,6 +2448,7 @@ source_set("unit_tests") {
|
||||
"//dbus",
|
||||
"//device/bluetooth",
|
||||
"//google_apis:test_support",
|
||||
"//google_apis/drive:test_support",
|
||||
"//mojo/public/cpp/system:system",
|
||||
"//services/service_manager/public/cpp/test:test_support",
|
||||
"//skia",
|
||||
|
@ -1266,6 +1266,7 @@ jumbo_split_static_library("ui") {
|
||||
"//chrome/browser/web_applications:web_applications_on_extensions",
|
||||
"//chrome/browser/web_applications/components",
|
||||
"//chrome/browser/web_applications/extensions",
|
||||
"//google_apis/drive",
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1732,6 +1733,7 @@ jumbo_split_static_library("ui") {
|
||||
"//components/login",
|
||||
"//components/session_manager/core",
|
||||
"//components/user_manager",
|
||||
"//google_apis/drive",
|
||||
"//services/data_decoder/public/cpp",
|
||||
"//services/device/public/cpp:device_features",
|
||||
"//services/device/public/mojom",
|
||||
|
@ -300,6 +300,7 @@ static_library("test_support") {
|
||||
"//chrome/common/extensions/api",
|
||||
"//components/guest_view/browser:test_support",
|
||||
"//extensions:test_support",
|
||||
"//google_apis/drive:test_support",
|
||||
]
|
||||
}
|
||||
|
||||
@ -1449,6 +1450,7 @@ test("browser_tests") {
|
||||
"//chrome/test/media_router:browser_tests",
|
||||
"//components/guest_view/browser:test_support",
|
||||
"//components/keep_alive_registry",
|
||||
"//google_apis/drive:test_support",
|
||||
|
||||
# TODO(rockot) bug 505926: The chrome_extensions_browsertests target
|
||||
# should be deleted and this line removed. See the
|
||||
@ -3802,6 +3804,7 @@ test("unit_tests") {
|
||||
"//extensions/renderer:unit_test_support",
|
||||
"//extensions/strings",
|
||||
"//google_apis",
|
||||
"//google_apis/drive",
|
||||
"//media/cast:test_support",
|
||||
"//services/network/public/mojom",
|
||||
|
||||
@ -4598,6 +4601,10 @@ if (!is_android) {
|
||||
"//ui/resources:ui_test_pak",
|
||||
"//ui/web_dialogs:test_support",
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
deps += [ "//google_apis/drive:test_support" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5665,6 +5672,10 @@ if (!is_android && !is_fuchsia) {
|
||||
"//ui/web_dialogs:test_support",
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
deps += [ "//google_apis/drive:test_support" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
|
@ -53,8 +53,9 @@ static_library("drive") {
|
||||
|
||||
# TODO(lukasza): Remove this dependency (see DEPS file for more info).
|
||||
"//content/public/browser",
|
||||
"//google_apis:google_apis",
|
||||
"//net:net",
|
||||
"//google_apis",
|
||||
"//google_apis/drive",
|
||||
"//net",
|
||||
"//services/device/public/mojom",
|
||||
"//third_party/cacheinvalidation",
|
||||
"//third_party/leveldatabase",
|
||||
@ -88,6 +89,7 @@ static_library("test_support") {
|
||||
"//components/prefs:test_support",
|
||||
"//content/test:test_support",
|
||||
"//google_apis:test_support",
|
||||
"//google_apis/drive:test_support",
|
||||
"//net:net",
|
||||
]
|
||||
}
|
||||
@ -177,8 +179,9 @@ if (is_chromeos) {
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
"//components/prefs",
|
||||
"//google_apis:google_apis",
|
||||
"//net:net",
|
||||
"//google_apis",
|
||||
"//google_apis/drive",
|
||||
"//net",
|
||||
]
|
||||
public_deps = [
|
||||
":proto",
|
||||
@ -204,6 +207,7 @@ if (is_chromeos) {
|
||||
"//components/prefs:test_support",
|
||||
"//content/test:test_support",
|
||||
"//google_apis:test_support",
|
||||
"//google_apis/drive:test_support",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -147,36 +147,6 @@ template("google_apis_tmpl") {
|
||||
deps += invoker.deps
|
||||
}
|
||||
|
||||
if (enable_extensions) {
|
||||
sources += [
|
||||
"drive/auth_service.cc",
|
||||
"drive/auth_service.h",
|
||||
"drive/auth_service_interface.h",
|
||||
"drive/auth_service_observer.h",
|
||||
"drive/base_requests.cc",
|
||||
"drive/base_requests.h",
|
||||
"drive/drive_api_error_codes.cc",
|
||||
"drive/drive_api_error_codes.h",
|
||||
"drive/drive_api_parser.cc",
|
||||
"drive/drive_api_parser.h",
|
||||
"drive/drive_api_requests.cc",
|
||||
"drive/drive_api_requests.h",
|
||||
"drive/drive_api_url_generator.cc",
|
||||
"drive/drive_api_url_generator.h",
|
||||
"drive/drive_common_callbacks.h",
|
||||
"drive/files_list_request_runner.cc",
|
||||
"drive/files_list_request_runner.h",
|
||||
"drive/request_sender.cc",
|
||||
"drive/request_sender.h",
|
||||
"drive/request_util.cc",
|
||||
"drive/request_util.h",
|
||||
"drive/task_util.cc",
|
||||
"drive/task_util.h",
|
||||
"drive/time_util.cc",
|
||||
"drive/time_util.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac || is_ios) {
|
||||
set_sources_assignment_filter([])
|
||||
sources += [
|
||||
@ -220,15 +190,6 @@ static_library("test_support") {
|
||||
"//services/network:test_support",
|
||||
"//services/network/public/cpp",
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
sources += [
|
||||
"drive/dummy_auth_service.cc",
|
||||
"drive/dummy_auth_service.h",
|
||||
"drive/test_util.cc",
|
||||
"drive/test_util.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("run_all_unittests") {
|
||||
@ -279,17 +240,7 @@ test("google_apis_unittests") {
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
sources += [
|
||||
"drive/base_requests_server_unittest.cc",
|
||||
"drive/base_requests_unittest.cc",
|
||||
"drive/drive_api_parser_unittest.cc",
|
||||
"drive/drive_api_requests_unittest.cc",
|
||||
"drive/drive_api_url_generator_unittest.cc",
|
||||
"drive/files_list_request_runner_unittest.cc",
|
||||
"drive/request_sender_unittest.cc",
|
||||
"drive/request_util_unittest.cc",
|
||||
"drive/time_util_unittest.cc",
|
||||
]
|
||||
deps += [ "//google_apis/drive:drive_unittests" ]
|
||||
}
|
||||
|
||||
if (is_mac || is_ios) {
|
||||
|
96
google_apis/drive/BUILD.gn
Normal file
96
google_apis/drive/BUILD.gn
Normal file
@ -0,0 +1,96 @@
|
||||
# Copyright 2018 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/config/features.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
source_set("drive") {
|
||||
assert(enable_extensions,
|
||||
"Google Drive API requires being built with extensions")
|
||||
sources = [
|
||||
"auth_service.cc",
|
||||
"auth_service.h",
|
||||
"auth_service_interface.h",
|
||||
"auth_service_observer.h",
|
||||
"base_requests.cc",
|
||||
"base_requests.h",
|
||||
"drive_api_error_codes.cc",
|
||||
"drive_api_error_codes.h",
|
||||
"drive_api_parser.cc",
|
||||
"drive_api_parser.h",
|
||||
"drive_api_requests.cc",
|
||||
"drive_api_requests.h",
|
||||
"drive_api_url_generator.cc",
|
||||
"drive_api_url_generator.h",
|
||||
"drive_common_callbacks.h",
|
||||
"files_list_request_runner.cc",
|
||||
"files_list_request_runner.h",
|
||||
"request_sender.cc",
|
||||
"request_sender.h",
|
||||
"request_util.cc",
|
||||
"request_util.h",
|
||||
"task_util.cc",
|
||||
"task_util.h",
|
||||
"time_util.cc",
|
||||
"time_util.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
"//crypto",
|
||||
"//google_apis:google_apis",
|
||||
"//net",
|
||||
"//services/network/public/cpp",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("test_support") {
|
||||
assert(enable_extensions,
|
||||
"Google Drive API requires being built with extensions")
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"dummy_auth_service.cc",
|
||||
"dummy_auth_service.h",
|
||||
"test_util.cc",
|
||||
"test_util.h",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
":drive",
|
||||
"//base",
|
||||
"//base/test:test_support",
|
||||
"//google_apis:test_support",
|
||||
"//net:test_support",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("drive_unittests") {
|
||||
assert(enable_extensions,
|
||||
"Google Drive API requires being built with extensions")
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"base_requests_server_unittest.cc",
|
||||
"base_requests_unittest.cc",
|
||||
"drive_api_parser_unittest.cc",
|
||||
"drive_api_requests_unittest.cc",
|
||||
"drive_api_url_generator_unittest.cc",
|
||||
"files_list_request_runner_unittest.cc",
|
||||
"request_sender_unittest.cc",
|
||||
"request_util_unittest.cc",
|
||||
"time_util_unittest.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":drive",
|
||||
":test_support",
|
||||
"//base",
|
||||
"//base/test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user