summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-10-14 15:25:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-14 22:26:00 +0000
commitfdb7f7fa8b32547063721d66e504bbabd804a574 (patch)
tree278c3d851163bcbee4c4f8a04d096246cdf9e056
parenta76aff9561f138b52e6beb94828491c94fd8b924 (diff)
downloadchromium_src-fdb7f7fa8b32547063721d66e504bbabd804a574.zip
chromium_src-fdb7f7fa8b32547063721d66e504bbabd804a574.tar.gz
chromium_src-fdb7f7fa8b32547063721d66e504bbabd804a574.tar.bz2
Make chrome/common pass "gn check"
This adds some dependencies and marks them all public. Since chrome/common doesn't have much of an API or structure, deciding what should be public or not is basically impossible. Removes the include of content_switches from chrome_switches. Files depending on this have already been updated to include content_switches directly. Moves the nss_security_manager code out of chrome_browser. This was used only by chrome_common. In GYP This is now part of chrome_common_net. In GN, this is a separate target that chrome_common_net depends on. Review URL: https://codereview.chromium.org/1393953003 Cr-Commit-Position: refs/heads/master@{#354132}
-rw-r--r--.gn1
-rw-r--r--chrome/chrome_browser.gypi6
-rw-r--r--chrome/chrome_common.gypi9
-rw-r--r--chrome/common/BUILD.gn53
-rw-r--r--chrome/common/chrome_content_client.cc2
-rw-r--r--chrome/common/chrome_paths_android.cc1
-rw-r--r--chrome/common/chrome_switches.h4
-rw-r--r--chrome/common/crash_keys.cc6
-rw-r--r--chrome/common/net/BUILD.gn6
-rw-r--r--chrome/third_party/mozilla_security_manager/BUILD.gn19
-rw-r--r--components/policy/BUILD.gn12
-rw-r--r--extensions/common/BUILD.gn4
-rw-r--r--extensions/common/api/BUILD.gn4
-rw-r--r--ppapi/shared_impl/BUILD.gn7
14 files changed, 89 insertions, 45 deletions
diff --git a/.gn b/.gn
index 5a7b9ce..4e2f684 100644
--- a/.gn
+++ b/.gn
@@ -24,6 +24,7 @@ check_targets = [
"//cc/*",
#"//chrome/*", # Epic number of errors.
+ "//chrome/common/*",
"//chrome/installer/*",
"//chromecast/*",
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index df61844..184ec92 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2047,12 +2047,6 @@
'browser/net/nss_context.h',
'browser/net/nss_context_chromeos.cc',
'browser/net/nss_context_linux.cc',
- 'third_party/mozilla_security_manager/nsNSSCertHelper.cpp',
- 'third_party/mozilla_security_manager/nsNSSCertHelper.h',
- 'third_party/mozilla_security_manager/nsNSSCertificate.cpp',
- 'third_party/mozilla_security_manager/nsNSSCertificate.h',
- 'third_party/mozilla_security_manager/nsUsageArrayHelper.cpp',
- 'third_party/mozilla_security_manager/nsUsageArrayHelper.h',
],
'chrome_browser_password_manager_sources': [
'browser/password_manager/chrome_password_manager_client.cc',
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index de1cde4..15a442a 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -595,6 +595,15 @@
],
}],
['use_nss_certs == 1', {
+ 'sources': [
+ # GN version: //chrome/third_party/mozilla_security_manager
+ 'third_party/mozilla_security_manager/nsNSSCertHelper.cpp',
+ 'third_party/mozilla_security_manager/nsNSSCertHelper.h',
+ 'third_party/mozilla_security_manager/nsNSSCertificate.cpp',
+ 'third_party/mozilla_security_manager/nsNSSCertificate.h',
+ 'third_party/mozilla_security_manager/nsUsageArrayHelper.cpp',
+ 'third_party/mozilla_security_manager/nsUsageArrayHelper.h',
+ ],
'dependencies': [
'../build/linux/system.gyp:ssl',
],
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 2d81952..e1f8f3a 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -47,10 +47,6 @@ static_library("common") {
]
public_deps = [
- "//chrome/common:constants",
- "//chrome/common/safe_browsing:proto",
- ]
- deps = [
"//base:base",
"//base:i18n",
"//base:prefs",
@@ -58,12 +54,17 @@ static_library("common") {
"//chrome:resources",
"//chrome:strings",
"//chrome/app/theme:theme_resources",
+ "//chrome/common:constants",
+ "//chrome/common/safe_browsing:proto",
"//chrome/common/variations:fieldtrial_testing_config",
"//chrome/installer/util",
"//components/cloud_devices/common",
"//components/component_updater",
"//components/content_settings/core/common",
"//components/crash/core/common",
+ "//components/data_reduction_proxy/content/common",
+ "//components/dom_distiller/core",
+ "//components/error_page/common",
"//components/favicon_base",
"//components/gcm_driver/common",
"//components/json_schema",
@@ -79,10 +80,20 @@ static_library("common") {
"//content/public/common",
"//crypto",
"//extensions/common:common_constants",
+ "//gin",
+ "//google_apis",
+ "//gpu/command_buffer/service",
+ "//gpu/config",
"//net",
+ "//ppapi/shared_impl",
"//skia",
"//third_party/icu",
"//third_party/zlib:zip",
+ "//ui/accessibility",
+ "//ui/base",
+ "//ui/gfx/ipc",
+ "//ui/gl",
+ "//ui/message_center",
"//ui/resources:resources",
"//url",
]
@@ -98,8 +109,9 @@ static_library("common") {
]
} else {
# Non-iOS.
- deps += [
+ public_deps += [
":mojo_bindings",
+ "//chrome/common/net",
"//components/visitedlink/common",
"//components/autofill/content/common",
"//components/autofill/core/common",
@@ -110,11 +122,8 @@ static_library("common") {
"//media",
"//ipc",
"//third_party/re2",
- "//third_party/widevine/cdm:version_h",
- ]
- public_deps += [
- "//chrome/common/net",
"//third_party/mojo/src/mojo/public/cpp/bindings",
+ "//third_party/widevine/cdm:version_h",
]
}
@@ -122,7 +131,7 @@ static_library("common") {
sources += rebase_path(gypi_values.chrome_common_extensions_sources,
".",
"//chrome")
- deps += [
+ public_deps += [
"//device/usb",
"//chrome/common/extensions/api",
"//extensions/common",
@@ -130,6 +139,9 @@ static_library("common") {
"//extensions:extensions_resources",
"//extensions/strings",
"//media/cast:net",
+
+ # This dependency is for a header used only by extensions code.
+ "//ui/keyboard:keyboard_with_content",
]
if (is_chromeos) {
sources +=
@@ -142,7 +154,7 @@ static_library("common") {
if (is_win || is_mac) {
sources +=
rebase_path(gypi_values.chrome_common_win_mac_sources, ".", "//chrome")
- deps += [ "//breakpad:client" ]
+ public_deps += [ "//breakpad:client" ]
}
if (is_win || is_mac || is_chromeos) {
sources += rebase_path(gypi_values.chrome_common_networking_private_sources,
@@ -150,21 +162,24 @@ static_library("common") {
"//chrome")
# networking_private_crypto.cc depends on boringssl.
- deps += [ "//third_party/boringssl" ]
+ public_deps += [ "//third_party/boringssl" ]
}
if (is_mac) {
sources +=
rebase_path(gypi_values.chrome_common_mac_sources, ".", "//chrome")
- deps += [ ":app_mode_app_support" ]
+ public_deps += [ ":app_mode_app_support" ]
+ }
+ if (is_chromeos) {
+ public_deps += [ "//chromeos" ]
}
if (enable_nacl) {
- deps += [ "//components/nacl:nacl_common" ]
+ public_deps += [ "//components/nacl:nacl_common" ]
}
# Printing.
if (enable_basic_printing || enable_print_preview) {
- deps += [
+ public_deps += [
"//components/printing/common",
"//printing",
]
@@ -207,7 +222,7 @@ static_library("common") {
}
if (is_win) {
- deps += [
+ public_deps += [
"//components/dom_distiller/core", # Needed by chrome_content_client.cc.
"//third_party/wtl",
]
@@ -219,7 +234,7 @@ static_library("common") {
if (is_mac) {
sources -= [ "channel_info_posix.cc" ]
- deps += [
+ public_deps += [
"//third_party/mach_override",
"//third_party/google_toolbox_for_mac",
]
@@ -232,7 +247,7 @@ static_library("common") {
"ppapi_utils.cc",
"ppapi_utils.h",
]
- deps += [ "//third_party/adobe/flash:flapper_version_h" ]
+ public_deps += [ "//third_party/adobe/flash:flapper_version_h" ]
}
if (enable_plugins && enable_extensions) {
sources += [
@@ -244,7 +259,7 @@ static_library("common") {
sources -= [ "media/webrtc_logging_messages.h" ]
}
if (enable_configuration_policy) {
- deps += [ "//components/policy" ]
+ public_deps += [ "//components/policy" ]
}
if (safe_browsing_mode == 1) {
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index c0d6265..4c24a3a 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -68,7 +68,7 @@
#if defined(ENABLE_PLUGINS)
#include "content/public/common/pepper_plugin_info.h"
-#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
+#include "flapper_version.h" // nogncheck In SHARED_INTERMEDIATE_DIR.
#include "ppapi/shared_impl/ppapi_permissions.h"
#endif
diff --git a/chrome/common/chrome_paths_android.cc b/chrome/common/chrome_paths_android.cc
index a78b48d..9184418 100644
--- a/chrome/common/chrome_paths_android.cc
+++ b/chrome/common/chrome_paths_android.cc
@@ -7,7 +7,6 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "content/public/common/content_switches.h"
namespace chrome {
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 5e53039..a0f360d 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -13,10 +13,6 @@
// Don't add more switch files here. This is linked into some places like the
// installer where dependencies should be limited. Instead, have files
// directly include your switch file.
-//
-// TODO(brettw) delete content_switches.h include and make callers include that
-// file manually if they need a content switch.
-#include "content/public/common/content_switches.h"
namespace switches {
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index 3cd3cd4..8b2aabf 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -16,10 +16,12 @@
#include "content/public/common/content_switches.h"
#include "ipc/ipc_switches.h"
+// Breakpad dependencies exist only on Windows and Mac desktop. Exclude them
+// from "gn check" to avoid failures on Linux (it doesn't understand ifdefs).
#if defined(OS_MACOSX)
-#include "breakpad/src/common/simple_string_dictionary.h"
+#include "breakpad/src/common/simple_string_dictionary.h" // nogncheck
#elif defined(OS_WIN)
-#include "breakpad/src/client/windows/common/ipc_protocol.h"
+#include "breakpad/src/client/windows/common/ipc_protocol.h" // nogncheck
#elif defined(OS_CHROMEOS)
#include "chrome/common/chrome_switches.h"
#include "gpu/command_buffer/service/gpu_switches.h"
diff --git a/chrome/common/net/BUILD.gn b/chrome/common/net/BUILD.gn
index 70e6b72..87a5931 100644
--- a/chrome/common/net/BUILD.gn
+++ b/chrome/common/net/BUILD.gn
@@ -19,6 +19,7 @@ static_library("net") {
deps = [
"//base",
+ "//base:i18n",
"//chrome:resources",
"//chrome:strings",
"//components/url_formatter",
@@ -44,7 +45,10 @@ static_library("net") {
}
if (use_nss_certs) {
- deps += [ "//crypto:platform" ]
+ deps += [
+ "//chrome/third_party/mozilla_security_manager",
+ "//crypto:platform",
+ ]
} else {
sources -= [ "x509_certificate_model_nss.cc" ]
}
diff --git a/chrome/third_party/mozilla_security_manager/BUILD.gn b/chrome/third_party/mozilla_security_manager/BUILD.gn
new file mode 100644
index 0000000..8c144533
--- /dev/null
+++ b/chrome/third_party/mozilla_security_manager/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright 2015 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.
+
+source_set("mozilla_security_manager") {
+ sources = [
+ "nsNSSCertHelper.cpp",
+ "nsNSSCertHelper.h",
+ "nsNSSCertificate.cpp",
+ "nsNSSCertificate.h",
+ "nsUsageArrayHelper.cpp",
+ "nsUsageArrayHelper.h",
+ ]
+
+ deps = [
+ "//crypto:platform",
+ "//third_party/icu",
+ ]
+}
diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
index 7b5cca1..b6274b8b 100644
--- a/components/policy/BUILD.gn
+++ b/components/policy/BUILD.gn
@@ -24,35 +24,35 @@ import("//tools/grit/grit_rule.gni")
# dependencies (GN will do the right thing without this extra target).
if (is_component_build) {
component("policy_component") {
- deps = [
+ public_deps = [
"//components/policy/core/browser",
"//components/policy/core/common",
]
}
group("policy_component_browser") {
- deps = [
+ public_deps = [
":policy_component",
]
}
group("policy_component_common") {
- deps = [
+ public_deps = [
":policy_component",
]
}
} else { # Compile to separate libraries.
group("policy_component") {
- deps = [
+ public_deps = [
":policy_component_browser",
":policy_component_common",
]
}
component("policy_component_browser") {
- deps = [
+ public_deps = [
"//components/policy/core/browser",
]
}
component("policy_component_common") {
- deps = [
+ public_deps = [
"//components/policy/core/common",
]
}
diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn
index 3a557d3..c0bff59 100644
--- a/extensions/common/BUILD.gn
+++ b/extensions/common/BUILD.gn
@@ -41,10 +41,12 @@ if (enable_extensions) {
"//build/config/compiler:no_size_t_to_int_warning",
]
- deps = [
+ public_deps = [
":common_constants",
":mojo",
+ ]
+ deps = [
# TODO(benwells): figure out what to do with the api target and
# api resources compiled into the chrome resource bundle.
# http://crbug.com/162530
diff --git a/extensions/common/api/BUILD.gn b/extensions/common/api/BUILD.gn
index 474e041..b589fd2 100644
--- a/extensions/common/api/BUILD.gn
+++ b/extensions/common/api/BUILD.gn
@@ -24,8 +24,8 @@ mojom("mojom") {
}
# GYP version: extensions/common/api/api.gyp:extensions_api
-source_set("api") {
- deps = [
+group("api") {
+ public_deps = [
":mojom",
":generated_api",
]
diff --git a/ppapi/shared_impl/BUILD.gn b/ppapi/shared_impl/BUILD.gn
index 25ad904..3b92a0a 100644
--- a/ppapi/shared_impl/BUILD.gn
+++ b/ppapi/shared_impl/BUILD.gn
@@ -159,6 +159,11 @@ component("shared_impl") {
"PPAPI_THUNK_IMPLEMENTATION",
]
+ public_deps = [
+ "//ppapi/c",
+ "//ppapi/thunk",
+ ]
+
deps = [
"//base",
"//base:i18n",
@@ -169,8 +174,6 @@ component("shared_impl") {
"//gpu/command_buffer/common",
"//ipc",
"//media:shared_memory_support",
- "//ppapi/c",
- "//ppapi/thunk",
"//third_party/icu:icuuc",
"//url",
]