Index: extensions/components/javascript_dialog_extensions_client/javascript_dialog_extension_client_impl.cc |
diff --git a/extensions/components/javascript_dialog_extensions_client/javascript_dialog_extension_client_impl.cc b/extensions/components/javascript_dialog_extensions_client/javascript_dialog_extension_client_impl.cc |
index 52f3e7e6b95a92e65f7f297f4f5507dcdef96c20..d2f5d50518ad955ee87d6ca7c520f2ce395e37df 100644 |
--- a/extensions/components/javascript_dialog_extensions_client/javascript_dialog_extension_client_impl.cc |
+++ b/extensions/components/javascript_dialog_extensions_client/javascript_dialog_extension_client_impl.cc |
@@ -11,6 +11,7 @@ |
#include "extensions/browser/process_manager.h" |
#include "extensions/common/extension.h" |
#include "ui/gfx/native_widget_types.h" |
+#include "url/origin.h" |
namespace javascript_dialog_extensions_client { |
namespace { |
@@ -62,8 +63,8 @@ class JavaScriptDialogExtensionsClientImpl |
const GURL& origin_url, |
std::string* name_out) override { |
const Extension* extension = GetExtensionForWebContents(web_contents); |
- if (extension && |
- web_contents->GetLastCommittedURL().GetOrigin() == origin_url) { |
+ if (extension && url::IsSameOriginWith( |
+ origin_url, web_contents->GetLastCommittedURL())) { |
*name_out = extension->name(); |
return true; |
} |