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

Unified Diff: chrome/renderer/extensions/api_activity_logger.h

Issue 18769009: [Activity Log] fix logging of blocked API calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Probably helps to spell things correctly Created 7 years, 5 months 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
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..f8b297760aa3225d1de904bf97150a293ef0e122 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,31 @@ 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.
+ // 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 schema_generated_bindings.js with
- // JavaScript arguments. Logged as an EventAction.
+ // 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 for the Dispatcher to use to log blocked API calls.
+ // 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);
not at google - send to devlin 2013/07/12 15:53:07 unrelated comment: do these v8-exposed functions n
felt 2013/07/13 04:38:55 I thought they had be to work, but it appears they
+
+ // 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.
« no previous file with comments | « no previous file | chrome/renderer/extensions/api_activity_logger.cc » ('j') | chrome/renderer/extensions/dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698