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

Unified Diff: chrome/common/extensions/permissions/chrome_permission_message_provider.cc

Issue 323633003: Change tabs + sessions permission warning (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/common/extensions/permissions/permission_set_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/permissions/chrome_permission_message_provider.cc
===================================================================
--- chrome/common/extensions/permissions/chrome_permission_message_provider.cc (revision 274309)
+++ chrome/common/extensions/permissions/chrome_permission_message_provider.cc (working copy)
@@ -105,6 +105,8 @@
bool media_galleries_read = false;
bool media_galleries_copy_to = false;
bool media_galleries_delete = false;
+ bool tabs = false;
+ bool history = false;
for (PermissionMessages::const_iterator i = messages.begin();
i != messages.end(); ++i) {
switch (i->id()) {
@@ -123,6 +125,12 @@
case PermissionMessage::kMediaGalleriesAllGalleriesDelete:
media_galleries_delete = true;
break;
+ case PermissionMessage::kTabs:
+ tabs = true;
+ break;
+ case PermissionMessage::kBrowsingHistory:
+ history = true;
+ break;
default:
break;
}
@@ -155,6 +163,18 @@
continue;
}
}
+ if (tabs && permissions->HasAPIPermission(APIPermission::kSessions) &&
+ id == PermissionMessage::kTabs) {
not at google - send to devlin 2014/06/09 16:57:31 am I missing something or is this check and the id
wjywbs 2014/06/09 20:06:28 You are right. A lot of lines are not necessary. T
+ message_strings.push_back(l10n_util::GetStringUTF16(
+ IDS_EXTENSION_PROMPT_WARNING_TABS_AND_SESSIONS));
+ continue;
+ }
+ if (history && permissions->HasAPIPermission(APIPermission::kSessions) &&
+ id == PermissionMessage::kBrowsingHistory) {
+ message_strings.push_back(l10n_util::GetStringUTF16(
+ IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY_AND_SESSIONS));
+ continue;
+ }
message_strings.push_back(i->message());
}
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/common/extensions/permissions/permission_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698