Index: chrome/common/extensions/manifest_handlers/automation.cc |
diff --git a/chrome/common/extensions/manifest_handlers/automation.cc b/chrome/common/extensions/manifest_handlers/automation.cc |
index f6945ed6cdb81945641751bcdc501dafce41caa9..aed16c4dfbaed34ea6c99bc132cfc10fe1147130 100644 |
--- a/chrome/common/extensions/manifest_handlers/automation.cc |
+++ b/chrome/common/extensions/manifest_handlers/automation.cc |
@@ -88,9 +88,16 @@ PermissionMessages AutomationManifestPermission::GetMessages() const { |
PermissionMessage::kFullAccess, |
l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS))); |
} else if (automation_info_->matches.MatchesAllURLs()) { |
- messages.push_back(PermissionMessage( |
- PermissionMessage::kHostsAll, |
- l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS))); |
+ if (automation_info_->interact) { |
+ messages.push_back(PermissionMessage( |
+ PermissionMessage::kHostsAll, |
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS))); |
+ } else { |
+ messages.push_back(PermissionMessage( |
+ PermissionMessage::kHostsAllReadOnly, |
+ l10n_util::GetStringUTF16( |
+ IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS_READ_ONLY))); |
+ } |
} else { |
URLPatternSet regular_hosts; |
std::set<PermissionMessage> message_set; |
@@ -100,8 +107,10 @@ PermissionMessages AutomationManifestPermission::GetMessages() const { |
std::set<std::string> hosts = |
permission_message_util::GetDistinctHosts(regular_hosts, true, true); |
- if (!hosts.empty()) |
- messages.push_back(permission_message_util::CreateFromHostList(hosts)); |
+ if (!hosts.empty()) { |
+ messages.push_back(permission_message_util::CreateFromHostList( |
+ hosts, !automation_info_->interact)); |
+ } |
} |
return messages; |