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

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

Issue 27446002: Move permission warning message handling from PermissionSet to PermissionMessageProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/common/extensions/permissions/app_permission_message_provider.cc
diff --git a/chrome/common/extensions/permissions/app_permission_message_provider.cc b/chrome/common/extensions/permissions/app_permission_message_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f8c0c12634aef3a12f855e514906c839413031c9
--- /dev/null
+++ b/chrome/common/extensions/permissions/app_permission_message_provider.cc
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/extensions/permissions/app_permission_message_provider.h"
+
+#include "chrome/common/extensions/permissions/permission_set.h"
+#include "extensions/common/permissions/permission_message.h"
+
+namespace extensions {
+
+AppPermissionMessageProvider::AppPermissionMessageProvider() {
+}
+
+AppPermissionMessageProvider::~AppPermissionMessageProvider() {
+}
+
+std::set<PermissionMessage>
+AppPermissionMessageProvider::GetHostPermissionMessages(
Matt Perry 2013/10/16 20:07:04 It seems like these 2 special cases are the only r
Yoyo Zhou 2013/10/17 19:45:52 Ok. I thought this was going to be more useful tha
+ const PermissionSet* permissions) const {
+ // Since platform apps always use isolated storage, they can't (silently)
+ // access user data on other domains, so there's no need to prompt.
+ // Note: this must remain consistent with HasLessHostPrivilegesThan.
+ // See crbug.com/255229.
+ std::set<PermissionMessage> messages;
+ return messages;
+}
+
+bool AppPermissionMessageProvider::IsHostPrivilegeIncrease(
+ const PermissionSet* old_permissions,
+ const PermissionSet* new_permissions) const {
+ // Platform apps host permission changes do not count as privilege increases.
+ // Note: this must remain consistent with GetHostPermissionMessages.
+ return false;
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698