| Index: chrome/renderer/extensions/api_activity_logger.h
|
| diff --git a/chrome/renderer/extensions/api_activity_logger.h b/chrome/renderer/extensions/api_activity_logger.h
|
| index 8d675aac9249f3e3d61a50a7a284d0c0cc5b826e..544ce5fd6b2a231f0427b27073d4203f98d1a926 100644
|
| --- a/chrome/renderer/extensions/api_activity_logger.h
|
| +++ b/chrome/renderer/extensions/api_activity_logger.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_RENDERER_EXTENSIONS_API_ACTIVITY_LOGGER_H_
|
|
|
| #include <string>
|
| +#include "chrome/common/extensions/features/feature.h"
|
| #include "chrome/renderer/extensions/chrome_v8_extension.h"
|
| #include "chrome/renderer/extensions/dispatcher.h"
|
| #include "v8/include/v8.h"
|
| @@ -19,25 +20,10 @@ class APIActivityLogger : public ChromeV8Extension {
|
| public:
|
| APIActivityLogger(Dispatcher* dispatcher, ChromeV8Context* context);
|
|
|
| - // This is ultimately invoked in schema_generated_bindings.js with
|
| - // JavaScript arguments. Logged as an APIAction.
|
| - // arg0 - extension ID as a string
|
| - // arg1 - API call name as a string
|
| - // arg2 - arguments to the API call
|
| - // arg3 - any extra logging info as a string (optional)
|
| - static void LogAPICall(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| -
|
| - // This is ultimately invoked in schema_generated_bindings.js with
|
| - // JavaScript arguments. Logged as an EventAction.
|
| - // arg0 - extension ID as a string
|
| - // arg1 - Event name as a string
|
| - // arg2 - Event arguments
|
| - // arg3 - any extra logging info as a string (optional)
|
| - static void LogEvent(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| -
|
| - // This is for the Dispatcher to use to log blocked API calls.
|
| + // This is to use to log blocked API calls.
|
| static void LogBlockedCall(const std::string& extension_id,
|
| - const std::string& function_name);
|
| + const std::string& function_name,
|
| + Feature::AvailabilityResult result);
|
|
|
| private:
|
| // Used to distinguish API calls & events from each other in LogInternal.
|
| @@ -46,6 +32,27 @@ class APIActivityLogger : public ChromeV8Extension {
|
| EVENT
|
| };
|
|
|
| + // This is ultimately invoked in bindings.js with JavaScript arguments.
|
| + // arg0 - extension ID as a string
|
| + // arg1 - API call name as a string
|
| + // arg2 - arguments to the API call
|
| + // arg3 - any extra logging info as a string (optional)
|
| + static void LogAPICall(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| +
|
| + // This is ultimately invoked in bindings.js with JavaScript arguments.
|
| + // arg0 - extension ID as a string
|
| + // arg1 - Event name as a string
|
| + // arg2 - Event arguments
|
| + // arg3 - any extra logging info as a string (optional)
|
| + static void LogEvent(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| +
|
| + // This is invoked in binding.js with JavaScript arguments.
|
| + // arg0 - extension ID as string
|
| + // arg1 - Function name as a string
|
| + // arg2 - Reason for the failure
|
| + static void LogBlockedCallWrapper(
|
| + const v8::FunctionCallbackInfo<v8::Value>& args);
|
| +
|
| // LogAPICall and LogEvent are really the same underneath except for
|
| // how they are ultimately dispatched to the log.
|
| static void LogInternal(const CallType call_type,
|
|
|