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

Side by Side Diff: services/catalog/entry.h

Issue 2651953002: Revert of [Service Manager] Get rid of dynamic service discovery (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « services/catalog/catalog.cc ('k') | services/catalog/entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ENTRY_H_ 5 #ifndef SERVICES_CATALOG_ENTRY_H_
6 #define SERVICES_CATALOG_ENTRY_H_ 6 #define SERVICES_CATALOG_ENTRY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "services/catalog/public/interfaces/catalog.mojom.h" 14 #include "services/catalog/public/interfaces/catalog.mojom.h"
15 #include "services/service_manager/public/cpp/interface_provider_spec.h" 15 #include "services/service_manager/public/cpp/interface_provider_spec.h"
16 #include "services/service_manager/public/interfaces/resolver.mojom.h" 16 #include "services/service_manager/public/interfaces/resolver.mojom.h"
17 17
18 namespace base { 18 namespace base {
19 class Value; 19 class DictionaryValue;
20 } 20 }
21 21
22 namespace catalog { 22 namespace catalog {
23 23
24 // Static information about a service package known to the Catalog. 24 // Static information about a service package known to the Catalog.
25 class Entry { 25 class Entry {
26 public: 26 public:
27 Entry(); 27 Entry();
28 explicit Entry(const std::string& name); 28 explicit Entry(const std::string& name);
29 ~Entry(); 29 ~Entry();
30 30
31 std::unique_ptr<base::DictionaryValue> Serialize() const; 31 std::unique_ptr<base::DictionaryValue> Serialize() const;
32 32
33 static std::unique_ptr<Entry> Deserialize(const base::Value& manifest_root); 33 static std::unique_ptr<Entry> Deserialize(const base::DictionaryValue& value);
34 34
35 bool ProvidesCapability(const std::string& capability) const; 35 bool ProvidesCapability(const std::string& capability) const;
36 36
37 bool operator==(const Entry& other) const; 37 bool operator==(const Entry& other) const;
38 38
39 const std::string& name() const { return name_; } 39 const std::string& name() const { return name_; }
40 void set_name(const std::string& name) { name_ = name; } 40 void set_name(const std::string& name) { name_ = name; }
41 41
42 const base::FilePath& path() const { return path_; } 42 const base::FilePath& path() const { return path_; }
43 void set_path(const base::FilePath& path) { path_ = path; } 43 void set_path(const base::FilePath& path) { path_ = path; }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }; 88 };
89 89
90 template<> 90 template<>
91 struct TypeConverter<catalog::mojom::EntryPtr, catalog::Entry> { 91 struct TypeConverter<catalog::mojom::EntryPtr, catalog::Entry> {
92 static catalog::mojom::EntryPtr Convert(const catalog::Entry& input); 92 static catalog::mojom::EntryPtr Convert(const catalog::Entry& input);
93 }; 93 };
94 94
95 } // namespace mojo 95 } // namespace mojo
96 96
97 #endif // SERVICES_CATALOG_ENTRY_H_ 97 #endif // SERVICES_CATALOG_ENTRY_H_
OLDNEW
« no previous file with comments | « services/catalog/catalog.cc ('k') | services/catalog/entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698