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

Unified Diff: chrome/browser/guest_view/extension_options/extension_options_guest.cc

Issue 429763002: Implement createfailed event for <extensionoptions> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more tests for bad extension id, nonexistent options page Created 6 years, 4 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: chrome/browser/guest_view/extension_options/extension_options_guest.cc
diff --git a/chrome/browser/guest_view/extension_options/extension_options_guest.cc b/chrome/browser/guest_view/extension_options/extension_options_guest.cc
index 3c8c4f5666259bf073bae23f9ecff3a27a6843c4..5e52787ed9ee0914910276dd90bf83cd7ff96b0f 100644
--- a/chrome/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/chrome/browser/guest_view/extension_options/extension_options_guest.cc
@@ -65,11 +65,16 @@ void ExtensionOptionsGuest::CreateWebContents(
// Get the extension's base URL.
std::string extension_id;
create_params.GetString(extensionoptions::kExtensionId, &extension_id);
- if (extension_id.empty()) {
+
+ if (!extensions::Extension::IdIsValid(extension_id)) {
+ callback.Run(NULL);
+ return;
+ }
+
+ if (extension_id != embedder_extension_id) {
callback.Run(NULL);
return;
}
- DCHECK(extensions::Extension::IdIsValid(extension_id));
GURL extension_url =
extensions::Extension::GetBaseURLFromExtensionId(extension_id);

Powered by Google App Engine
This is Rietveld 408576698