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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 10909256: Always send the full tab object in ExtensionAction click event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kalments Created 8 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/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 07003e6f692c1d570149b7ef2dbfe3bdfec4820a..e45fb80a03f3b6416752ae2c60bd40dfc585fe19 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -162,9 +162,7 @@ void MessageService::OpenChannelToExtension(
std::string tab_json = "null";
if (source_contents) {
scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
- source_contents,
- profile->GetExtensionService()->extensions()->GetByID(
- source_extension_id)));
+ source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}
@@ -196,7 +194,6 @@ void MessageService::OpenChannelToNativeApp(
content::RenderProcessHost::FromID(source_process_id);
if (!source)
return;
- Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
WebContents* source_contents = tab_util::GetWebContentsByID(
source_process_id, source_routing_id);
@@ -205,9 +202,7 @@ void MessageService::OpenChannelToNativeApp(
std::string tab_json = "null";
if (source_contents) {
scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
- source_contents,
- profile->GetExtensionService()->extensions()->GetByID(
- source_extension_id)));
+ source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}
@@ -292,9 +287,7 @@ void MessageService::OpenChannelToTab(
std::string tab_json = "null";
if (source_contents) {
scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
- source_contents,
- profile->GetExtensionService()->extensions()->GetByID(
- extension_id)));
+ source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}

Powered by Google App Engine
This is Rietveld 408576698