Skip to content

Commit b2454bd

Browse files
leizleizCommit bot
authored andcommitted
Revert of Cleanup: Remove remaining generated extensions APIs on Android. (patchset #4 id:60001 of https://codereview.chromium.org/573933002/)
Reason for revert: Android bot fails with error: gen/extensions/common/api/generated_schemas.cc: No such file or directory Original issue's description: > Cleanup: Remove remaining generated extensions APIs on Android. > > BUG=305852 > > Committed: https://crrev.com/379f0be47f454cce5c912f25d1b3302ba679b472 > Cr-Commit-Position: refs/heads/master@{#295669} [email protected] NOTREECHECKS=true NOTRY=true BUG=305852 Review URL: https://codereview.chromium.org/582933003 Cr-Commit-Position: refs/heads/master@{#295670}
1 parent 379f0be commit b2454bd

File tree

10 files changed

+73
-90
lines changed

10 files changed

+73
-90
lines changed

chrome/browser/autocomplete/shortcuts_provider_unittest.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@
3232
#include "components/omnibox/autocomplete_result.h"
3333
#include "content/public/browser/notification_service.h"
3434
#include "content/public/test/test_browser_thread.h"
35-
#include "testing/gtest/include/gtest/gtest.h"
36-
37-
#if defined(ENABLE_EXTENSIONS)
3835
#include "extensions/browser/notification_types.h"
3936
#include "extensions/common/extension.h"
4037
#include "extensions/common/extension_builder.h"
4138
#include "extensions/common/value_builder.h"
42-
#endif
39+
#include "testing/gtest/include/gtest/gtest.h"
4340

4441
using base::ASCIIToUTF16;
4542

@@ -822,7 +819,6 @@ TEST_F(ShortcutsProviderTest, DeleteMatch) {
822819
backend_->shortcuts_map().find(ASCIIToUTF16("delete")));
823820
}
824821

825-
#if defined(ENABLE_EXTENSIONS)
826822
TEST_F(ShortcutsProviderTest, Extension) {
827823
// Try an input string that matches an extension URL.
828824
base::string16 text(ASCIIToUTF16("echo"));
@@ -851,4 +847,3 @@ TEST_F(ShortcutsProviderTest, Extension) {
851847
// Now the URL should have disappeared.
852848
RunTest(text, false, ExpectedURLs(), std::string(), base::string16());
853849
}
854-
#endif

chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
1010
#include "components/policy/core/common/policy_map.h"
1111
#include "components/policy/core/common/schema.h"
12-
#include "policy/policy_constants.h"
13-
14-
#if defined(ENABLE_EXTENSIONS)
1512
#include "extensions/common/value_builder.h"
16-
#endif
13+
#include "policy/policy_constants.h"
1714

1815
namespace policy {
1916

@@ -26,7 +23,6 @@ class ManagedBookmarksPolicyHandlerTest
2623
}
2724
};
2825

29-
#if defined(ENABLE_EXTENSIONS)
3026
TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
3127
EXPECT_FALSE(store_->GetValue(bookmarks::prefs::kManagedBookmarks, NULL));
3228

@@ -105,7 +101,6 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
105101
.Build());
106102
EXPECT_TRUE(pref_value->Equals(expected.get()));
107103
}
108-
#endif // defined(ENABLE_EXTENSIONS)
109104

110105
TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
111106
PolicyMap policy;
@@ -126,7 +121,6 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
126121
EXPECT_FALSE(store_->GetValue(bookmarks::prefs::kManagedBookmarks, NULL));
127122
}
128123

129-
#if defined(ENABLE_EXTENSIONS)
130124
TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
131125
PolicyMap policy;
132126
policy.Set(key::kManagedBookmarks,
@@ -155,9 +149,7 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
155149
.Build());
156150
EXPECT_TRUE(pref_value->Equals(expected.get()));
157151
}
158-
#endif
159152

160-
#if defined(ENABLE_EXTENSIONS)
161153
TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
162154
PolicyMap policy;
163155
policy.Set(key::kManagedBookmarks,
@@ -197,6 +189,5 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
197189
.Build());
198190
EXPECT_TRUE(pref_value->Equals(expected.get()));
199191
}
200-
#endif
201192

202193
} // namespace policy

chrome/chrome_browser.gypi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,6 +2885,8 @@
28852885
['OS != "ios"', {
28862886
'dependencies': [
28872887
'apps',
2888+
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
2889+
'common/extensions/api/api.gyp:chrome_api',
28882890
'debugger',
28892891
'installer_util',
28902892
'../third_party/re2/re2.gyp:re2',
@@ -3010,8 +3012,6 @@
30103012
['enable_extensions==1', {
30113013
'dependencies': [
30123014
'browser_extensions',
3013-
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
3014-
'common/extensions/api/api.gyp:chrome_api',
30153015
'sync_file_system_drive_proto',
30163016
],
30173017
'sources': [ '<@(chrome_browser_extensions_sources)' ],

chrome/chrome_browser_ui.gypi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,7 +2608,9 @@
26082608
'<(SHARED_INTERMEDIATE_DIR)/chrome/browser/ui/webui/omnibox/omnibox.mojom.cc',
26092609
],
26102610
'dependencies': [
2611+
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
26112612
'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
2613+
'common/extensions/api/api.gyp:chrome_api',
26122614
'debugger',
26132615
'installer_util',
26142616
'../components/components.gyp:autofill_content_risk_proto',
@@ -2958,8 +2960,6 @@
29582960
['enable_extensions==1', {
29592961
'dependencies': [
29602962
'browser_extensions',
2961-
'browser/extensions/api/api_registration.gyp:chrome_api_registration',
2962-
'common/extensions/api/api.gyp:chrome_api',
29632963
],
29642964
'sources': [ '<@(chrome_browser_ui_extensions_sources)' ],
29652965
}],

chrome/chrome_common.gypi

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,30 @@
5353
'common/custom_handlers/protocol_handler.cc',
5454
'common/custom_handlers/protocol_handler.h',
5555
'common/descriptors_android.h',
56+
'common/extensions/api/extension_action/action_info.cc',
57+
'common/extensions/api/extension_action/action_info.h',
58+
'common/extensions/api/i18n/default_locale_handler.cc',
59+
'common/extensions/api/i18n/default_locale_handler.h',
60+
'common/extensions/api/identity/oauth2_manifest_handler.cc',
61+
'common/extensions/api/identity/oauth2_manifest_handler.h',
62+
'common/extensions/api/plugins/plugins_handler.cc',
63+
'common/extensions/api/plugins/plugins_handler.h',
64+
'common/extensions/api/storage/storage_schema_manifest_handler.cc',
65+
'common/extensions/api/storage/storage_schema_manifest_handler.h',
66+
'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
67+
'common/extensions/api/supervised_user_private/supervised_user_handler.h',
5668
'common/extensions/chrome_extension_messages.h',
5769
'common/extensions/chrome_extensions_client.cc',
5870
'common/extensions/chrome_extensions_client.h',
71+
'common/extensions/chrome_manifest_handlers.cc',
72+
'common/extensions/chrome_manifest_handlers.h',
5973
'common/extensions/chrome_utility_extensions_messages.h',
6074
'common/extensions/command.cc',
6175
'common/extensions/command.h',
6276
'common/extensions/extension_constants.cc',
6377
'common/extensions/extension_constants.h',
78+
'common/extensions/extension_file_util.cc',
79+
'common/extensions/extension_file_util.h',
6480
'common/extensions/extension_process_policy.cc',
6581
'common/extensions/extension_process_policy.h',
6682
'common/extensions/features/chrome_channel_feature_filter.cc',
@@ -69,6 +85,28 @@
6985
'common/extensions/features/feature_channel.h',
7086
'common/extensions/image_writer/image_writer_util_mac.cc',
7187
'common/extensions/image_writer/image_writer_util_mac.h',
88+
'common/extensions/manifest_handlers/app_isolation_info.cc',
89+
'common/extensions/manifest_handlers/app_isolation_info.h',
90+
'common/extensions/manifest_handlers/app_launch_info.cc',
91+
'common/extensions/manifest_handlers/app_launch_info.h',
92+
'common/extensions/manifest_handlers/automation.h',
93+
'common/extensions/manifest_handlers/automation.cc',
94+
'common/extensions/manifest_handlers/content_scripts_handler.cc',
95+
'common/extensions/manifest_handlers/content_scripts_handler.h',
96+
'common/extensions/manifest_handlers/mime_types_handler.cc',
97+
'common/extensions/manifest_handlers/mime_types_handler.h',
98+
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
99+
'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
100+
'common/extensions/manifest_handlers/settings_overrides_handler.cc',
101+
'common/extensions/manifest_handlers/settings_overrides_handler.h',
102+
'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
103+
'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
104+
'common/extensions/manifest_handlers/theme_handler.cc',
105+
'common/extensions/manifest_handlers/theme_handler.h',
106+
'common/extensions/manifest_handlers/ui_overrides_handler.cc',
107+
'common/extensions/manifest_handlers/ui_overrides_handler.h',
108+
'common/extensions/manifest_url_handler.cc',
109+
'common/extensions/manifest_url_handler.h',
72110
'common/extensions/permissions/chrome_api_permissions.cc',
73111
'common/extensions/permissions/chrome_api_permissions.h',
74112
'common/extensions/permissions/chrome_permission_message_provider.cc',
@@ -150,66 +188,28 @@
150188
'chrome_common_extensions_sources': [
151189
'common/extensions/api/commands/commands_handler.cc',
152190
'common/extensions/api/commands/commands_handler.h',
153-
'common/extensions/api/extension_action/action_info.cc',
154-
'common/extensions/api/extension_action/action_info.h',
155191
'common/extensions/api/extension_action/browser_action_handler.cc',
156192
'common/extensions/api/extension_action/browser_action_handler.h',
157193
'common/extensions/api/extension_action/page_action_handler.cc',
158194
'common/extensions/api/extension_action/page_action_handler.h',
159195
'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
160196
'common/extensions/api/file_browser_handlers/file_browser_handler.h',
161-
'common/extensions/api/i18n/default_locale_handler.cc',
162-
'common/extensions/api/i18n/default_locale_handler.h',
163-
'common/extensions/api/identity/oauth2_manifest_handler.cc',
164-
'common/extensions/api/identity/oauth2_manifest_handler.h',
165197
'common/extensions/api/input_ime/input_components_handler.cc',
166198
'common/extensions/api/input_ime/input_components_handler.h',
167199
'common/extensions/api/notifications/notification_style.cc',
168200
'common/extensions/api/notifications/notification_style.h',
169201
'common/extensions/api/omnibox/omnibox_handler.cc',
170202
'common/extensions/api/omnibox/omnibox_handler.h',
171-
'common/extensions/api/plugins/plugins_handler.cc',
172-
'common/extensions/api/plugins/plugins_handler.h',
173203
'common/extensions/api/speech/tts_engine_manifest_handler.cc',
174204
'common/extensions/api/speech/tts_engine_manifest_handler.h',
175205
'common/extensions/api/spellcheck/spellcheck_handler.cc',
176206
'common/extensions/api/spellcheck/spellcheck_handler.h',
177-
'common/extensions/api/storage/storage_schema_manifest_handler.cc',
178-
'common/extensions/api/storage/storage_schema_manifest_handler.h',
179-
'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
180-
'common/extensions/api/supervised_user_private/supervised_user_handler.h',
181207
'common/extensions/api/system_indicator/system_indicator_handler.cc',
182208
'common/extensions/api/system_indicator/system_indicator_handler.h',
183209
'common/extensions/api/url_handlers/url_handlers_parser.cc',
184210
'common/extensions/api/url_handlers/url_handlers_parser.h',
185211
'common/extensions/api/webstore/webstore_api_constants.cc',
186212
'common/extensions/api/webstore/webstore_api_constants.h',
187-
'common/extensions/chrome_manifest_handlers.cc',
188-
'common/extensions/chrome_manifest_handlers.h',
189-
'common/extensions/extension_file_util.cc',
190-
'common/extensions/extension_file_util.h',
191-
'common/extensions/manifest_handlers/app_isolation_info.cc',
192-
'common/extensions/manifest_handlers/app_isolation_info.h',
193-
'common/extensions/manifest_handlers/app_launch_info.cc',
194-
'common/extensions/manifest_handlers/app_launch_info.h',
195-
'common/extensions/manifest_handlers/automation.cc',
196-
'common/extensions/manifest_handlers/automation.h',
197-
'common/extensions/manifest_handlers/content_scripts_handler.cc',
198-
'common/extensions/manifest_handlers/content_scripts_handler.h',
199-
'common/extensions/manifest_handlers/mime_types_handler.cc',
200-
'common/extensions/manifest_handlers/mime_types_handler.h',
201-
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
202-
'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
203-
'common/extensions/manifest_handlers/settings_overrides_handler.cc',
204-
'common/extensions/manifest_handlers/settings_overrides_handler.h',
205-
'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
206-
'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
207-
'common/extensions/manifest_handlers/theme_handler.cc',
208-
'common/extensions/manifest_handlers/theme_handler.h',
209-
'common/extensions/manifest_handlers/ui_overrides_handler.cc',
210-
'common/extensions/manifest_handlers/ui_overrides_handler.h',
211-
'common/extensions/manifest_url_handler.cc',
212-
'common/extensions/manifest_url_handler.h',
213213
],
214214
'chrome_common_full_safe_browsing_sources': [
215215
'common/safe_browsing/download_protection_util.cc',
@@ -336,8 +336,7 @@
336336
['enable_extensions==1', {
337337
'sources': [ '<@(chrome_common_extensions_sources)' ],
338338
'dependencies': [
339-
'<(DEPTH)/device/usb/usb.gyp:device_usb',
340-
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
339+
'../device/usb/usb.gyp:device_usb',
341340
],
342341
}],
343342
['OS=="win" or OS=="mac"', {
@@ -362,6 +361,7 @@
362361
'<(DEPTH)/components/components.gyp:signin_core_common',
363362
'<(DEPTH)/components/components.gyp:translate_content_common',
364363
'<(DEPTH)/components/components.gyp:visitedlink_common',
364+
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
365365
'<(DEPTH)/extensions/extensions.gyp:extensions_common',
366366
'<(DEPTH)/ipc/ipc.gyp:ipc',
367367
'<(DEPTH)/third_party/re2/re2.gyp:re2',

chrome/chrome_tests_unit.gypi

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,7 @@
16601660
'conditions': [
16611661
['OS!="ios"', {
16621662
'dependencies': [
1663+
'common/extensions/api/api.gyp:chrome_api',
16631664
'plugin',
16641665
'renderer',
16651666
'utility',
@@ -1671,6 +1672,7 @@
16711672
'../components/components.gyp:autofill_core_test_support',
16721673
'../components/components.gyp:captive_portal_test_support',
16731674
'../components/components.gyp:sessions_test_support',
1675+
'../extensions/extensions.gyp:extensions_test_support',
16741676
'../google_apis/google_apis.gyp:google_apis_test_support',
16751677
'../ipc/ipc.gyp:test_support_ipc',
16761678
'../media/media.gyp:media_test_support',
@@ -1784,8 +1786,6 @@
17841786
['enable_extensions==1', {
17851787
'dependencies': [
17861788
'../components/components.gyp:storage_monitor_test_support',
1787-
'../extensions/extensions.gyp:extensions_test_support',
1788-
'common/extensions/api/api.gyp:chrome_api',
17891789
],
17901790
'sources': [
17911791
'browser/drive/dummy_drive_service.cc',
@@ -1965,11 +1965,14 @@
19651965
'conditions': [
19661966
['OS!="ios"', {
19671967
'dependencies': [
1968+
'common/extensions/api/api.gyp:chrome_api',
19681969
'../components/components.gyp:autofill_content_test_support',
19691970
'../components/components.gyp:component_metrics_proto',
19701971
'../components/components.gyp:data_reduction_proxy_test_support',
19711972
'../components/components_strings.gyp:components_strings',
19721973
'../content/app/resources/content_resources.gyp:content_resources',
1974+
'../extensions/extensions_resources.gyp:extensions_resources',
1975+
'../extensions/extensions_strings.gyp:extensions_strings',
19731976
'../gpu/gpu.gyp:gpu_unittest_utils',
19741977
'../media/media.gyp:media_test_support',
19751978
'../ppapi/ppapi_internal.gyp:ppapi_unittest_shared',
@@ -2054,7 +2057,11 @@
20542057
['exclude', '^browser/extensions/'],
20552058
['exclude', '^browser/sync/glue/extensions_activity_monitor_unittest.cc'],
20562059
['exclude', '^browser/sync_file_system/'],
2057-
['exclude', '^common/extensions/'],
2060+
['exclude', '^common/extensions/api/'],
2061+
['exclude', '^common/extensions/manifest_handlers/'],
2062+
['exclude', '^common/extensions/manifest_tests/'],
2063+
# This test depends on manifest_tests.
2064+
['exclude', '^common/extensions/permissions/settings_override_permission_unittest.cc'],
20582065
['exclude', '^utility/extensions/'],
20592066
['exclude', '^utility/image_writer/'],
20602067
['exclude', '^utility/media_galleries/'],
@@ -2087,12 +2094,6 @@
20872094
'renderer/extensions/extension_localization_peer_unittest.cc',
20882095
'renderer/extensions/renderer_permissions_policy_delegate_unittest.cc',
20892096
],
2090-
}, { # enable_extensions==1
2091-
'dependencies': [
2092-
'common/extensions/api/api.gyp:chrome_api',
2093-
'../extensions/extensions_resources.gyp:extensions_resources',
2094-
'../extensions/extensions_strings.gyp:extensions_strings',
2095-
],
20962097
}],
20972098
['use_ash==1', {
20982099
'sources': [

chrome/common/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static_library("common") {
100100
gypi_values.chrome_common_extensions_sources,
101101
".", "//chrome")
102102
deps += [
103-
"//device/bluetooth", # TODO(thestig) Still needed? Not in gyp version.
103+
"//device/bluetooth",
104104
"//device/usb",
105105
"//extensions/common",
106106
"//extensions/common/api",

chrome/common/extensions/api/schemas.gypi

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
'<@(schema_files)',
88
],
99
'variables': {
10+
# These duplicate other lists and are the only ones used on Android. They
11+
# should be eliminated. See crbug.com/305852.
12+
'android_schema_files': [
13+
'manifest_types.json',
14+
],
15+
16+
# These are used everywhere except Android.
1017
'main_schema_files': [
1118
'accessibility_private.json',
1219
'activity_log_private.json',
@@ -135,9 +142,6 @@
135142
# Disable schema compiler to generate model extension API code.
136143
# Only register the extension functions in extension system.
137144
'conditions': [
138-
# TODO(thestig): Remove this file from non-extensions build so the
139-
# conditional and else branch goes away.
140-
# Do the same for chrome/common/extensions/api/schemas.gni.
141145
['enable_extensions==1', {
142146
'non_compiled_schema_files': [
143147
'<@(main_non_compiled_schema_files)',
@@ -157,6 +161,8 @@
157161
'schema_dependencies': [
158162
],
159163
'schema_files': [
164+
# These should be eliminated. See crbug.com/305852.
165+
'<@(android_schema_files)',
160166
],
161167
}],
162168
['chromeos==1', {

0 commit comments

Comments
 (0)