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

Unified Diff: chrome/browser/extensions/extension_function_dispatcher.cc

Issue 199074: Don't allow updating tabs to javascript URLs without host (Closed)
Patch Set: Remove unchanged file Created 11 years, 3 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/extensions/extension_function_dispatcher.cc
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index d0281c37583afa0619bad3f01abcde16dce60616..9892b4343023f73d82fb2574d7aaa2c68ce81537 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -245,6 +245,16 @@ ExtensionHost* ExtensionFunctionDispatcher::GetExtensionHost() {
return delegate_->GetExtensionHost();
}
+Extension* ExtensionFunctionDispatcher::GetExtension() {
+ ExtensionsService* service = profile()->GetExtensionsService();
+ DCHECK(service);
+
+ Extension* extension = service->GetExtensionById(extension_id());
+ DCHECK(extension);
+
+ return extension;
+}
+
void ExtensionFunctionDispatcher::HandleRequest(const std::string& name,
const std::string& args,
int request_id,

Powered by Google App Engine
This is Rietveld 408576698