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

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

Issue 1779683002: Add catalog unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@43catalog
Patch Set: . Created 4 years, 9 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 | « mojo/services/catalog/loader.h ('k') | mojo/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SERVICES_CATALOG_STORE_H_
6 #define MOJO_SERVICES_CATALOG_STORE_H_
7
8 #include "base/values.h"
9
10 namespace catalog {
11
12 // Implemented by an object that provides storage for the application catalog
13 // (e.g. in Chrome, preferences). The Catalog is the canonical owner of the
14 // contents of the store, so no one else must modify its contents.
15 class Store {
16 public:
17 // Value is a string.
18 static const char kNameKey[];
19 // Value is a string.
20 static const char kQualifierKey[];
21 // Value is a string.
22 static const char kDisplayNameKey[];
23 // Value is a dictionary that maps from the filter to a list of string
24 // interfaces.
25 static const char kCapabilitiesKey[];
26
27 virtual ~Store() {}
28
29 // Called during initialization to construct the Catalog's catalog.
30 // Returns a serialized list of the apps. Each entry in the returned list
31 // corresponds to an app (as a dictionary). Each dictionary has a name,
32 // display name and capabilities. The return value is owned by the caller.
33 virtual const base::ListValue* GetStore() = 0;
34
35 // Write the catalog to the store. Called when the Catalog learns of a newly
36 // encountered application.
37 virtual void UpdateStore(scoped_ptr<base::ListValue> store) = 0;
38 };
39
40 } // namespace catalog
41
42 #endif // MOJO_SERVICES_CATALOG_STORE_H_
OLDNEW
« no previous file with comments | « mojo/services/catalog/loader.h ('k') | mojo/services/catalog/store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698