| Index: chrome/renderer/extensions/api_definitions_natives.cc
|
| ===================================================================
|
| --- chrome/renderer/extensions/api_definitions_natives.cc (revision 137393)
|
| +++ chrome/renderer/extensions/api_definitions_natives.cc (working copy)
|
| @@ -4,12 +4,6 @@
|
|
|
| #include "chrome/renderer/extensions/api_definitions_natives.h"
|
|
|
| -#include <algorithm>
|
| -
|
| -namespace {
|
| -const char kInvalidExtensionNamespace[] = "Invalid extension namespace";
|
| -}
|
| -
|
| namespace extensions {
|
|
|
| ApiDefinitionsNatives::ApiDefinitionsNatives(
|
| @@ -25,29 +19,8 @@
|
| ChromeV8Context* v8_context =
|
| extension_dispatcher()->v8_context_set().GetCurrent();
|
| CHECK(v8_context);
|
| -
|
| - std::set<std::string> available_apis(v8_context->GetAvailableExtensionAPIs());
|
| - if (args.Length() == 0) {
|
| - return extension_dispatcher()->v8_schema_registry()->GetSchemas(
|
| - available_apis);
|
| - }
|
| - // Build set of APIs requested by the user.
|
| - std::set<std::string> requested_apis;
|
| - for (int i = 0; i < args.Length(); ++i) {
|
| - if (!args[i]->IsString()) {
|
| - v8::ThrowException(v8::String::New(kInvalidExtensionNamespace));
|
| - return v8::Undefined();
|
| - }
|
| - requested_apis.insert(*v8::String::Utf8Value(args[i]->ToString()));
|
| - }
|
| -
|
| - // Filter those that are unknown.
|
| - std::set<std::string> apis_to_check;
|
| - std::set_intersection(requested_apis.begin(), requested_apis.end(),
|
| - available_apis.begin(), available_apis.end(),
|
| - std::inserter(apis_to_check, apis_to_check.begin()));
|
| return extension_dispatcher()->v8_schema_registry()->GetSchemas(
|
| - apis_to_check);
|
| + v8_context->GetAvailableExtensionAPIs());
|
| }
|
|
|
| } // namespace extensions
|
|
|