Index: chrome/browser/geolocation/geolocation_infobar_delegate.cc |
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate.cc b/chrome/browser/geolocation/geolocation_infobar_delegate.cc |
index 0d1e5aa8a63d2655dbc6db48bf58da1a7add66b9..40ad3b4bf88569ab721157c65a7ec24b04c69aad 100644 |
--- a/chrome/browser/geolocation/geolocation_infobar_delegate.cc |
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
+#include "base/strings/string_split.h" |
#include "chrome/browser/content_settings/permission_queue_controller.h" |
#include "chrome/browser/google/google_util.h" |
#include "chrome/browser/infobars/infobar_service.h" |
@@ -65,8 +66,16 @@ bool GeolocationInfoBarDelegate::Accept() { |
void GeolocationInfoBarDelegate::SetPermission(bool update_content_setting, |
bool allowed) { |
if (web_contents()) { |
- controller_->OnPermissionSet(id_, requesting_frame_, |
- web_contents()->GetURL(), |
+ GURL embedder = web_contents()->GetLastCommittedURL(); |
+ if (embedder.has_ref()) { |
+ // The ref (the hash) is not important here, and including it may cause a |
+ // comparison failure later because it can change. |
+ std::vector<std::string> parts; |
+ base::SplitString(embedder.spec(), '#', &parts); |
+ embedder = GURL(parts[0]); |
joth
2013/09/12 16:43:13
rather than grepping for # I think you can use thi
Michael van Ouwerkerk
2013/09/12 16:50:41
Done.
|
+ } |
+ |
+ controller_->OnPermissionSet(id_, requesting_frame_, embedder, |
bulach
2013/09/12 16:28:41
probably best to have just the controller and cont
Michael van Ouwerkerk
2013/09/12 16:50:41
Done.
|
update_content_setting, allowed); |
} |
} |