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

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

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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 CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_H_
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_H_ 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // any |optional| permissions are present, they are also 'absorbed' by the rule 47 // any |optional| permissions are present, they are also 'absorbed' by the rule
48 // to generate the final coalesced message. 48 // to generate the final coalesced message.
49 // An optional |formatter| can be provided, which decides how the final 49 // An optional |formatter| can be provided, which decides how the final
50 // PermissionMessage appears. The default formatter simply displays the message 50 // PermissionMessage appears. The default formatter simply displays the message
51 // with the ID |message_id|. 51 // with the ID |message_id|.
52 // Once a permission is used in a rule, it cannot apply to any future rules. 52 // Once a permission is used in a rule, it cannot apply to any future rules.
53 // TODO(sashab): Move all ChromePermissionMessageFormatters to their own 53 // TODO(sashab): Move all ChromePermissionMessageFormatters to their own
54 // provider class and remove ownership from ChromePermissionMessageRule. 54 // provider class and remove ownership from ChromePermissionMessageRule.
55 class ChromePermissionMessageRule { 55 class ChromePermissionMessageRule {
56 public: 56 public:
57 ChromePermissionMessageRule(const ChromePermissionMessageRule& other);
57 virtual ~ChromePermissionMessageRule(); 58 virtual ~ChromePermissionMessageRule();
58 59
59 // Returns all the rules used to generate permission messages for Chrome apps 60 // Returns all the rules used to generate permission messages for Chrome apps
60 // and extensions. 61 // and extensions.
61 static std::vector<ChromePermissionMessageRule> GetAllRules(); 62 static std::vector<ChromePermissionMessageRule> GetAllRules();
62 63
63 std::set<APIPermission::ID> required_permissions() const; 64 std::set<APIPermission::ID> required_permissions() const;
64 std::set<APIPermission::ID> optional_permissions() const; 65 std::set<APIPermission::ID> optional_permissions() const;
65 std::set<APIPermission::ID> all_permissions() const; 66 std::set<APIPermission::ID> all_permissions() const;
66 67
(...skipping 17 matching lines...) Expand all
84 std::set<APIPermission::ID> optional_permissions_; 85 std::set<APIPermission::ID> optional_permissions_;
85 86
86 // Owned by this class. linked_ptr is needed because this object is copyable 87 // Owned by this class. linked_ptr is needed because this object is copyable
87 // and stored in a returned vector. 88 // and stored in a returned vector.
88 linked_ptr<ChromePermissionMessageFormatter> formatter_; 89 linked_ptr<ChromePermissionMessageFormatter> formatter_;
89 }; 90 };
90 91
91 } // namespace extensions 92 } // namespace extensions
92 93
93 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_ H_ 94 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_RULES_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698