OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_CATALOG_MANIFEST_PROVIDER_H_ | 5 #ifndef SERVICES_CATALOG_MANIFEST_PROVIDER_H_ |
6 #define SERVICES_CATALOG_MANIFEST_PROVIDER_H_ | 6 #define SERVICES_CATALOG_MANIFEST_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string_piece.h" | 10 namespace base { |
| 11 class Value; |
| 12 } |
11 | 13 |
12 namespace catalog { | 14 namespace catalog { |
13 | 15 |
14 // An interface which can be implemented by a catalog embedder to override | 16 // An interface which can be implemented by a catalog embedder to override |
15 // manifest fetching behavior. | 17 // manifest fetching behavior. |
16 class ManifestProvider { | 18 class ManifestProvider { |
17 public: | 19 public: |
18 virtual ~ManifestProvider() {} | 20 virtual ~ManifestProvider() {} |
19 | 21 |
20 // Retrieves the raw contents of the manifest for application named |name|. | 22 // Retrieves the raw contents of the manifest for application named |name|. |
21 // Returns true if |name| is known and |*manifest_contents| is populated. | 23 // Returns true if |name| is known and |*manifest_contents| is populated. |
22 // returns false otherwise. | 24 // returns false otherwise. |
23 virtual bool GetApplicationManifest(const base::StringPiece& name, | 25 virtual std::unique_ptr<base::Value> GetManifest(const std::string& name) = 0; |
24 std::string* manifest_contents) = 0; | |
25 }; | 26 }; |
26 | 27 |
27 } // namespace catalog | 28 } // namespace catalog |
28 | 29 |
29 #endif // SERVICES_CATALOG_MANIFEST_PROVIDER_H_ | 30 #endif // SERVICES_CATALOG_MANIFEST_PROVIDER_H_ |
OLD | NEW |