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

Unified Diff: content/browser/renderer_host/render_widget_helper.cc

Issue 999193003: Add RoutingIDIssuer to help track routing id issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: content/browser/renderer_host/render_widget_helper.cc
diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc
index e9d83f49f14dd822f7c420c00fa2b744887a7184..eceb4071e2616baff8247e2f965a4ab1db01986b 100644
--- a/content/browser/renderer_host/render_widget_helper.cc
+++ b/content/browser/renderer_host/render_widget_helper.cc
@@ -16,6 +16,7 @@
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
+#include "content/browser/renderer_host/routing_id_issuer.h"
#include "content/common/view_messages.h"
namespace content {
@@ -37,6 +38,7 @@ void AddWidgetHelper(int render_process_id,
RenderWidgetHelper::RenderWidgetHelper()
: render_process_id_(-1),
+ routing_id_issuer_(RoutingIDIssuer::Create()),
resource_dispatcher_host_(NULL) {
}
@@ -63,7 +65,11 @@ void RenderWidgetHelper::Init(
}
int RenderWidgetHelper::GetNextRoutingID() {
- return next_routing_id_.GetNext() + 1;
+ return routing_id_issuer_->IssueNext();
+}
+
+bool RenderWidgetHelper::IsRoutingIDProbablyValid(int routing_id) const {
+ return routing_id_issuer_->IsProbablyValid(routing_id);
}
// static
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.h ('k') | content/browser/renderer_host/routing_id_issuer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698