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

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

Issue 2164503006: Rename mojo_application GN templates to service* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/reader.cc ('k') | services/catalog/store.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_STORE_H_ 5 #ifndef SERVICES_CATALOG_STORE_H_
6 #define SERVICES_CATALOG_STORE_H_ 6 #define SERVICES_CATALOG_STORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
11 11
12 namespace catalog { 12 namespace catalog {
13 13
14 // Implemented by an object that provides storage for the application catalog 14 // Implemented by an object that provides storage for the service catalog
15 // (e.g. in Chrome, preferences). The Catalog is the canonical owner of the 15 // (e.g. in Chrome, preferences). The Catalog is the canonical owner of the
16 // contents of the store, so no one else must modify its contents. 16 // contents of the store, so no one else must modify its contents.
17 class Store { 17 class Store {
18 public: 18 public:
19 // Value is an integer. 19 // Value is an integer.
20 static const char kManifestVersionKey[]; 20 static const char kManifestVersionKey[];
21 // Value is a string. 21 // Value is a string.
22 static const char kNameKey[]; 22 static const char kNameKey[];
23 // Value is a string. 23 // Value is a string.
24 static const char kQualifierKey[]; 24 static const char kQualifierKey[];
25 // Value is a string. 25 // Value is a string.
26 static const char kDisplayNameKey[]; 26 static const char kDisplayNameKey[];
27 // Value is a dictionary. 27 // Value is a dictionary.
28 static const char kCapabilitiesKey[]; 28 static const char kCapabilitiesKey[];
29 // Value is a dictionary. 29 // Value is a dictionary.
30 static const char kCapabilities_ProvidedKey[]; 30 static const char kCapabilities_ProvidedKey[];
31 // Value is a dictionary. 31 // Value is a dictionary.
32 static const char kCapabilities_RequiredKey[]; 32 static const char kCapabilities_RequiredKey[];
33 // Value is a list. 33 // Value is a list.
34 static const char kCapabilities_ClassesKey[]; 34 static const char kCapabilities_ClassesKey[];
35 // Value is a list. 35 // Value is a list.
36 static const char kCapabilities_InterfacesKey[]; 36 static const char kCapabilities_InterfacesKey[];
37 // Value is a list. 37 // Value is a list.
38 static const char kApplicationsKey[]; 38 static const char kServicesKey[];
39 39
40 virtual ~Store() {} 40 virtual ~Store() {}
41 41
42 // Called during initialization to construct the Catalog's catalog. 42 // Called during initialization to construct the Catalog's catalog.
43 // Returns a serialized list of the apps. Each entry in the returned list 43 // Returns a serialized list of the services. Each entry in the returned list
44 // corresponds to an app (as a dictionary). Each dictionary has a name, 44 // corresponds to an app (as a dictionary). Each dictionary has a name,
45 // display name and capabilities. The return value is owned by the caller. 45 // display name and capabilities. The return value is owned by the caller.
46 virtual const base::ListValue* GetStore() = 0; 46 virtual const base::ListValue* GetStore() = 0;
47 47
48 // Write the catalog to the store. Called when the Catalog learns of a newly 48 // Write the catalog to the store. Called when the Catalog learns of a newly
49 // encountered application. 49 // encountered service.
50 virtual void UpdateStore(std::unique_ptr<base::ListValue> store) = 0; 50 virtual void UpdateStore(std::unique_ptr<base::ListValue> store) = 0;
51 }; 51 };
52 52
53 } // namespace catalog 53 } // namespace catalog
54 54
55 #endif // SERVICES_CATALOG_STORE_H_ 55 #endif // SERVICES_CATALOG_STORE_H_
OLDNEW
« no previous file with comments | « services/catalog/reader.cc ('k') | services/catalog/store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698