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

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

Issue 10829186: Tabs API is usable without tabs permission. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 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/extensions/message_service.cc
diff --git a/chrome/browser/extensions/message_service.cc b/chrome/browser/extensions/message_service.cc
index 8758c13df577ec0dfbe168b1b215a1abc3c2b2fc..e5eb7610281d756f73fcda49cdb1d91655d4e7c3 100644
--- a/chrome/browser/extensions/message_service.cc
+++ b/chrome/browser/extensions/message_service.cc
@@ -219,8 +219,10 @@ void MessageService::OpenChannelToExtension(
// Include info about the opener's tab (if it was a tab).
std::string tab_json = "null";
if (source_contents) {
- scoped_ptr<DictionaryValue> tab_value(
- ExtensionTabUtil::CreateTabValue(source_contents));
+ scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
+ source_contents,
+ profile->GetExtensionService()->extensions()->GetByID(
+ source_extension_id)));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}
@@ -271,8 +273,10 @@ void MessageService::OpenChannelToTab(
// Include info about the opener's tab (if it was a tab).
std::string tab_json = "null";
if (source_contents) {
- scoped_ptr<DictionaryValue> tab_value(
- ExtensionTabUtil::CreateTabValue(source_contents));
+ scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
+ source_contents,
+ profile->GetExtensionService()->extensions()->GetByID(
+ extension_id)));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}

Powered by Google App Engine
This is Rietveld 408576698