Index: chrome/browser/extensions/execute_code_in_tab_function.cc |
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc |
index 1e6f92d373474aa4b70a0248f9db4bbfa70fb6d4..e9542500514e978ca2f72d65e60d862d7015b7c3 100644 |
--- a/chrome/browser/extensions/execute_code_in_tab_function.cc |
+++ b/chrome/browser/extensions/execute_code_in_tab_function.cc |
@@ -90,7 +90,7 @@ bool ExecuteCodeInTabFunction::RunImpl() { |
CHECK(browser); |
CHECK(contents); |
if (!GetExtension()->CanExecuteScriptOnPage( |
- contents->web_contents()->GetURL(), NULL, &error_)) { |
+ contents->web_contents()->GetURL(), execute_tab_id_, NULL, &error_)) { |
return false; |
} |
@@ -120,11 +120,8 @@ bool ExecuteCodeInTabFunction::RunImpl() { |
return false; |
} |
- if (!code_string.empty()) { |
- if (!Execute(code_string)) |
- return false; |
- return true; |
- } |
+ if (!code_string.empty()) |
+ return Execute(code_string); |
Aaron Boodman
2012/06/06 01:03:13
heh.
|
std::string relative_path; |
if (script_info->HasKey(keys::kFileKey)) { |
@@ -227,16 +224,12 @@ bool ExecuteCodeInTabFunction::Execute(const std::string& code_string) { |
execute_tab_id_, profile(), include_incognito(), &browser, NULL, |
&contents, NULL) && contents && browser; |
- if (!success) { |
- SendResponse(false); |
Aaron Boodman
2012/06/06 01:03:13
This seems like it would be a behavior change.
not at google - send to devlin
2012/06/06 07:38:40
Don't think so*. It think it's an existing bug in
|
+ if (!success) |
return false; |
- } |
const extensions::Extension* extension = GetExtension(); |
- if (!extension) { |
- SendResponse(false); |
+ if (!extension) |
return false; |
- } |
ScriptExecutor::ScriptType script_type = ScriptExecutor::JAVASCRIPT; |
std::string function_name = name(); |