Chromium Code Reviews| 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 |