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

Unified Diff: chrome/browser/content_settings/permission_context_base.cc

Issue 799783002: Dismiss permission bubble request if it's a duplicate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/permission_context_base.cc
diff --git a/chrome/browser/content_settings/permission_context_base.cc b/chrome/browser/content_settings/permission_context_base.cc
index 45ce75a0411c18d31d177a7b6d126e7ac54eedf4..20d0e672d9330c35b817b2d83b47c4ee8371e7a8 100644
--- a/chrome/browser/content_settings/permission_context_base.cc
+++ b/chrome/browser/content_settings/permission_context_base.cc
@@ -117,6 +117,13 @@ void PermissionContextBase::DecidePermission(
PermissionContextUmaUtil::PermissionRequested(
permission_type_, requesting_origin);
+ // The request should only be null if the request_ptr has destructed, which
+ // should not normally happen before this invoked.
+ // TODO(felt): crbug.com/433877, where a bug causes this to occur.
+ DCHECK(pending_bubbles_.get(id.ToString()) != NULL);
groby-ooo-7-16 2015/01/28 22:47:00 Please don't do that - style guide explicitly call
felt 2015/01/29 06:06:06 Done. Picked error handling.
+ if (pending_bubbles_.get(id.ToString()) != NULL)
+ return;
+
if (PermissionBubbleManager::Enabled()) {
PermissionBubbleManager* bubble_manager =
PermissionBubbleManager::FromWebContents(web_contents);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698