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

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

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a unit test Created 8 years, 6 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/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();

Powered by Google App Engine
This is Rietveld 408576698