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

Unified Diff: extensions/renderer/bindings/api_request_handler.h

Issue 2962093002: [Extensions Bindings] Add activity logging of custom handling (Closed)
Patch Set: nit Created 3 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: extensions/renderer/bindings/api_request_handler.h
diff --git a/extensions/renderer/bindings/api_request_handler.h b/extensions/renderer/bindings/api_request_handler.h
index c395aa7a605be475b9b961087e916d8b5dc3df76..a2ce5da8ed61b090a1fd1dbfe1d76725c75b6c0b 100644
--- a/extensions/renderer/bindings/api_request_handler.h
+++ b/extensions/renderer/bindings/api_request_handler.h
@@ -85,6 +85,7 @@ class APIRequestHandler {
void InvalidateContext(v8::Local<v8::Context> context);
APILastError* last_error() { return &last_error_; }
+ int last_sent_request_id() const { return last_sent_request_id_; }
std::set<int> GetPendingRequestIdsForTesting() const;
@@ -108,6 +109,11 @@ class APIRequestHandler {
// The next available request identifier.
int next_request_id_ = 0;
+ // The id of the last request we sent to the browser. This can be used as a
+ // flag for whether or not a request was sent (if the last_sent_request_id_
+ // changes).
+ int last_sent_request_id_ = -1;
+
// A map of all pending requests.
std::map<int, PendingRequest> pending_requests_;
« no previous file with comments | « extensions/renderer/bindings/api_bindings_system_unittest.cc ('k') | extensions/renderer/bindings/api_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698