OLD | NEW |
| (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 #include "mojo/shell/background/tests/test_application_catalog_store.h" | |
6 | |
7 using package_manager::ApplicationCatalogStore; | |
8 | |
9 namespace mojo { | |
10 namespace shell { | |
11 | |
12 TestApplicationCatalogStore::TestApplicationCatalogStore( | |
13 scoped_ptr<base::ListValue> store) | |
14 : store_(std::move(store)) {} | |
15 | |
16 TestApplicationCatalogStore::~TestApplicationCatalogStore() {} | |
17 | |
18 const base::ListValue* TestApplicationCatalogStore::GetStore() { | |
19 get_store_called_ = true; | |
20 return store_.get(); | |
21 } | |
22 | |
23 void TestApplicationCatalogStore::UpdateStore( | |
24 scoped_ptr<base::ListValue> store) {} | |
25 | |
26 scoped_ptr<base::DictionaryValue> BuildPermissiveSerializedAppInfo( | |
27 const std::string& name, | |
28 const std::string& display_name) { | |
29 scoped_ptr<base::DictionaryValue> app(new base::DictionaryValue); | |
30 app->SetString(ApplicationCatalogStore::kNameKey, name); | |
31 app->SetString(ApplicationCatalogStore::kDisplayNameKey, display_name); | |
32 | |
33 scoped_ptr<base::DictionaryValue> capabilities(new base::DictionaryValue); | |
34 scoped_ptr<base::ListValue> interfaces(new base::ListValue); | |
35 interfaces->AppendString("*"); | |
36 capabilities->Set("*", std::move(interfaces)); | |
37 | |
38 app->Set(ApplicationCatalogStore::kCapabilitiesKey, std::move(capabilities)); | |
39 | |
40 return app; | |
41 } | |
42 | |
43 } // namespace shell | |
44 } // namespace mojo | |
OLD | NEW |