Commit f112ccdd authored by jamescook's avatar jamescook Committed by Commit bot

Add support for extensions_unittests to the GN build

* Fix dependency issues in //extensions
* Make protobuf library add the "src" directory to the compiler's include
  directory list, otherwise it tries to use /usr/include/google/protobuf
  which has incompatible headers.

BUG=455919
TEST=compiles and links in both component and non-component builds

Review URL: https://codereview.chromium.org/889253004

Cr-Commit-Position: refs/heads/master@{#315067}
parent 53b0c831
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
'../extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc', '../extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc',
'../extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc', '../extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc',
'../extensions/browser/api/cast_channel/cast_channel_apitest.cc', '../extensions/browser/api/cast_channel/cast_channel_apitest.cc',
'../extensions/browser/api/cast_channel/test_util.cc',
'../extensions/browser/api/cast_channel/test_util.h',
'../extensions/browser/api/runtime/runtime_apitest.cc', '../extensions/browser/api/runtime/runtime_apitest.cc',
'../extensions/browser/api/serial/serial_apitest.cc', '../extensions/browser/api/serial/serial_apitest.cc',
'../extensions/browser/api/usb/usb_manual_apitest.cc', '../extensions/browser/api/usb/usb_manual_apitest.cc',
......
This diff is collapsed.
...@@ -554,6 +554,7 @@ source_set("browser") { ...@@ -554,6 +554,7 @@ source_set("browser") {
deps += [ deps += [
"//components/onc", "//components/onc",
"//components/storage_monitor", "//components/storage_monitor",
"//components/update_client",
"//crypto:platform", "//crypto:platform",
"//device/bluetooth", "//device/bluetooth",
"//device/core", "//device/core",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "content/public/browser/stream_handle.h" #include "content/public/browser/stream_handle.h"
#include "content/public/browser/stream_info.h" #include "content/public/browser/stream_info.h"
#include "extensions/browser/api/mime_handler_private/mime_handler_private.cc" #include "extensions/browser/api/mime_handler_private/mime_handler_private.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h" #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_VPN_VPN_SERVICE_FACTORY_H_ #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
#define CHROME_BROWSER_CHROMEOS_VPN_VPN_SERVICE_FACTORY_H_ #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
#include "base/macros.h" #include "base/macros.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
...@@ -44,4 +44,4 @@ class VpnServiceFactory : public BrowserContextKeyedServiceFactory { ...@@ -44,4 +44,4 @@ class VpnServiceFactory : public BrowserContextKeyedServiceFactory {
} // namespace chromeos } // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_VPN_VPN_SERVICE_FACTORY_H_ #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
...@@ -1142,6 +1142,7 @@ ...@@ -1142,6 +1142,7 @@
'../net/net.gyp:net_test_support', '../net/net.gyp:net_test_support',
'../testing/gtest.gyp:gtest', '../testing/gtest.gyp:gtest',
'browser/api/api_registration.gyp:extensions_api_registration', 'browser/api/api_registration.gyp:extensions_api_registration',
'common/api/api.gyp:cast_channel_proto',
'common/api/api.gyp:extensions_api', 'common/api/api.gyp:extensions_api',
'extensions_browser', 'extensions_browser',
'extensions_common', 'extensions_common',
...@@ -1153,6 +1154,8 @@ ...@@ -1153,6 +1154,8 @@
], ],
'sources': [ 'sources': [
# Note: sources list duplicated in GN build. # Note: sources list duplicated in GN build.
'browser/api/cast_channel/test_util.cc',
'browser/api/cast_channel/test_util.h',
'browser/api/dns/mock_host_resolver_creator.cc', 'browser/api/dns/mock_host_resolver_creator.cc',
'browser/api/dns/mock_host_resolver_creator.h', 'browser/api/dns/mock_host_resolver_creator.h',
'browser/api/storage/settings_test_util.cc', 'browser/api/storage/settings_test_util.cc',
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
'../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings', '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
'../third_party/mojo/mojo_public.gyp:mojo_application_bindings', '../third_party/mojo/mojo_public.gyp:mojo_application_bindings',
'common/api/api.gyp:cast_channel_proto', 'common/api/api.gyp:cast_channel_proto',
'extensions.gyp:extensions_browser',
'extensions.gyp:extensions_common', 'extensions.gyp:extensions_common',
'extensions.gyp:extensions_renderer', 'extensions.gyp:extensions_renderer',
'extensions.gyp:extensions_shell_and_test_pak', 'extensions.gyp:extensions_shell_and_test_pak',
......
...@@ -30,10 +30,13 @@ if (component_mode == "shared_library") { ...@@ -30,10 +30,13 @@ if (component_mode == "shared_library") {
} }
} }
# This condif should be applied to targets using generated code from the proto # This config should be applied to targets using generated code from the proto
# compiler. It sets up the include directories properly. # compiler. It sets up the include directories properly.
config("using_proto") { config("using_proto") {
include_dirs = [ "$root_gen_dir/protoc_out" ] include_dirs = [
"src",
"$root_gen_dir/protoc_out",
]
} }
protobuf_lite_sources = [ protobuf_lite_sources = [
......
...@@ -38,3 +38,5 @@ and unknown_field_set.h ...@@ -38,3 +38,5 @@ and unknown_field_set.h
GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings
in binary size. in binary size.
A BUILD.gn file has been added for building with GN.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment