Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ |
| 6 #define EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "extensions/common/permissions/api_permission.h" | 9 #include "extensions/common/permissions/api_permission.h" |
| 10 #include "extensions/common/permissions/media_galleries_permission_data.h" | 10 #include "extensions/common/permissions/media_galleries_permission_data.h" |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 ~MediaGalleriesPermission() override; | 36 ~MediaGalleriesPermission() override; |
| 37 | 37 |
| 38 // SetDisjunctionPermission overrides. | 38 // SetDisjunctionPermission overrides. |
| 39 // MediaGalleriesPermission does additional checks to make sure the | 39 // MediaGalleriesPermission does additional checks to make sure the |
| 40 // permissions do not contain unknown values. | 40 // permissions do not contain unknown values. |
| 41 bool FromValue(const base::Value* value, | 41 bool FromValue(const base::Value* value, |
| 42 std::string* error, | 42 std::string* error, |
| 43 std::vector<std::string>* unhandled_permissions) override; | 43 std::vector<std::string>* unhandled_permissions) override; |
| 44 | 44 |
| 45 // APIPermission overrides. | 45 // APIPermission overrides. |
| 46 PermissionIDSet GetPermissions() const override; | |
| 46 PermissionMessages GetMessages() const override; | 47 PermissionMessages GetMessages() const override; |
| 47 | 48 |
| 48 // Permission strings. | 49 // Permission strings. |
| 49 static const char kAllAutoDetectedPermission[]; | 50 static const char kAllAutoDetectedPermission[]; |
| 50 static const char kScanPermission[]; | 51 static const char kScanPermission[]; |
| 51 static const char kReadPermission[]; | 52 static const char kReadPermission[]; |
| 52 static const char kCopyToPermission[]; | 53 static const char kCopyToPermission[]; |
| 53 static const char kDeletePermission[]; | 54 static const char kDeletePermission[]; |
| 55 | |
| 56 private: | |
| 57 // TODO(sashab): Once GetMessages() is deprecated, move this logic back into | |
|
Yoyo Zhou
2014/12/11 00:54:11
nit: seems like this TODO should go in the impleme
sashab
2014/12/11 04:15:36
Done. Also renamed to AddPermissionsToLists() and
| |
| 58 // GetPermissions(). | |
| 59 void AddMessagesAndPermissions(PermissionIDSet* permission_ids, | |
| 60 PermissionMessages* permission_messages) const; | |
| 54 }; | 61 }; |
| 55 | 62 |
| 56 } // namespace extensions | 63 } // namespace extensions |
| 57 | 64 |
| 58 #endif // EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ | 65 #endif // EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ |
| OLD | NEW |