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

Side by Side Diff: chrome/common/extensions/permissions/media_galleries_permission.h

Issue 141743005: Extensions: Make it possible for permission parsing code to return a detailed error message. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/common/extensions/permissions/media_galleries_permission_data.h " 9 #include "chrome/common/extensions/permissions/media_galleries_permission_data.h "
10 #include "chrome/common/extensions/permissions/set_disjunction_permission.h" 10 #include "chrome/common/extensions/permissions/set_disjunction_permission.h"
(...skipping 19 matching lines...) Expand all
30 : permission(permission) {} 30 : permission(permission) {}
31 const std::string permission; 31 const std::string permission;
32 }; 32 };
33 33
34 explicit MediaGalleriesPermission(const APIPermissionInfo* info); 34 explicit MediaGalleriesPermission(const APIPermissionInfo* info);
35 virtual ~MediaGalleriesPermission(); 35 virtual ~MediaGalleriesPermission();
36 36
37 // SetDisjunctionPermission overrides. 37 // SetDisjunctionPermission overrides.
38 // MediaGalleriesPermission does additional checks to make sure the 38 // MediaGalleriesPermission does additional checks to make sure the
39 // permissions do not contain unknown values. 39 // permissions do not contain unknown values.
40 virtual bool FromValue(const base::Value* value) OVERRIDE; 40 virtual bool FromValue(const base::Value* value, std::string* error) OVERRIDE;
41 41
42 // APIPermission overrides. 42 // APIPermission overrides.
43 virtual PermissionMessages GetMessages() const OVERRIDE; 43 virtual PermissionMessages GetMessages() const OVERRIDE;
44 44
45 // Permission strings. 45 // Permission strings.
46 static const char kAllAutoDetectedPermission[]; 46 static const char kAllAutoDetectedPermission[];
47 static const char kReadPermission[]; 47 static const char kReadPermission[];
48 static const char kCopyToPermission[]; 48 static const char kCopyToPermission[];
49 static const char kDeletePermission[]; 49 static const char kDeletePermission[];
50 }; 50 };
51 51
52 } // namespace extensions 52 } // namespace extensions
53 53
54 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ 54 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698