Exclude chrome/common/extensions/api/ from build if enable_extensions==0

BUG=155069

Saves 170k in libchromeview.so


Review URL: https://chromiumcodereview.appspot.com/11411324

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170962 0039d316-1c4b-4281-b951-d872f2087c98
parent 01eb8fa8
......@@ -214,6 +214,7 @@
'common/extensions/value_counter.h',
'common/extensions/api/extension_api.cc',
'common/extensions/api/extension_api.h',
'common/extensions/api/extension_api_stub.cc',
'common/external_ipc_fuzzer.h',
'common/external_ipc_fuzzer.cc',
'common/favicon_url.cc',
......@@ -425,6 +426,16 @@
'common/chrome_version_info_posix.cc',
],
}],
['enable_extensions==1', {
'sources!': [
'common/extensions/api/extension_api_stub.cc',
],
}, { # enable_extensions == 0
'sources/': [
['exclude', '^common/extensions/api/'],
['include', 'common/extensions/api/extension_api_stub.cc'],
],
}],
['remoting==1', {
'dependencies': [
'../remoting/remoting.gyp:remoting_client_plugin',
......
......@@ -123,7 +123,7 @@
},
],
'conditions': [
['OS != "ios"', {
['enable_extensions==1', {
'actions': [
{
'action_name': 'extensions_api_resources',
......
......@@ -1729,6 +1729,7 @@
'sources/': [
['exclude', '^browser/extensions/api/'],
['exclude', '^browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc'],
['exclude', '^common/extensions/api/'],
],
}],
['use_ash==1', {
......
// Copyright (c) 2012 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.
// Stub methods to be used when extensions are disabled
// i.e. ENABLE_EXTENSIONS is not defined
#include "chrome/common/extensions/api/extension_api.h"
namespace extensions {
// static
ExtensionAPI* ExtensionAPI::GetSharedInstance() {
return NULL;
}
// static
ExtensionAPI* ExtensionAPI::CreateWithDefaultConfiguration() {
return NULL;
}
bool ExtensionAPI::IsPrivileged(const std::string& full_name) {
return false;
}
} // namespace extensions
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