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

Side by Side Diff: extensions/common/permissions/mock_manifest_permission.h

Issue 2850493002: Extracted MockManifestPermission to its own file (Closed)
Patch Set: Put MockManifestPermission in extensions/BUILD.gn Created 3 years, 7 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_MOCK_MANIFEST_PERMISSION_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_MOCK_MANIFEST_PERMISSION_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/values.h"
Devlin 2017/04/28 17:09:54 I think a forward declaration is sufficient here.
Ivan Šandrk 2017/05/02 12:12:56 Done.
12 #include "extensions/common/permissions/api_permission_set.h"
Devlin 2017/04/28 17:09:54 needed?
Ivan Šandrk 2017/05/02 12:12:56 Done.
13 #include "extensions/common/permissions/manifest_permission.h"
14
15 namespace extensions {
16
17 class MockManifestPermission : public ManifestPermission {
Devlin 2017/04/28 17:09:54 Add a brief class comment
Ivan Šandrk 2017/05/02 12:12:56 Done.
18 public:
19 explicit MockManifestPermission(const std::string& name);
20
21 std::string name() const override;
22 std::string id() const override;
23
24 PermissionIDSet GetPermissions() const override;
25
26 bool FromValue(const base::Value* value) override;
27 std::unique_ptr<base::Value> ToValue() const override;
28
29 ManifestPermission* Diff(const ManifestPermission* rhs) const override;
30 ManifestPermission* Union(const ManifestPermission* rhs) const override;
31 ManifestPermission* Intersect(const ManifestPermission* rhs) const override;
32
33 private:
34 std::string name_;
Devlin 2017/04/28 17:09:54 DISALLOW_COPY_AND_ASSIGN
Ivan Šandrk 2017/05/02 12:12:56 Done.
35 };
36
37 } // namespace extensions
38
39 #endif // EXTENSIONS_COMMON_PERMISSIONS_MOCK_MANIFEST_PERMISSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698