Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1255)

Unified Diff: chrome/common/extensions/api/extension_api_stub.cc

Issue 11411324: Exclude chrome/common/extensions/api/ from build if enable_extensions==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api_stub.cc
diff --git a/chrome/common/extensions/api/extension_api_stub.cc b/chrome/common/extensions/api/extension_api_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..759c33e01625675c88d807924395261f83f66301
--- /dev/null
+++ b/chrome/common/extensions/api/extension_api_stub.cc
@@ -0,0 +1,26 @@
+// 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698