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

Side by Side Diff: services/catalog/catalog.cc

Issue 1878893002: Move //mojo/services tracing & catalog to //services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@63move
Patch Set: . Created 4 years, 8 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.h ('k') | services/catalog/data/capabilities » ('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 #include "mojo/services/catalog/catalog.h" 5 #include "services/catalog/catalog.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
11 #include "base/task_runner_util.h" 11 #include "base/task_runner_util.h"
12 #include "base/thread_task_runner_handle.h" 12 #include "base/thread_task_runner_handle.h"
13 #include "mojo/common/url_type_converters.h" 13 #include "mojo/common/url_type_converters.h"
14 #include "mojo/services/catalog/entry.h" 14 #include "services/catalog/entry.h"
15 #include "mojo/services/catalog/manifest_provider.h" 15 #include "services/catalog/manifest_provider.h"
16 #include "mojo/services/catalog/store.h" 16 #include "services/catalog/store.h"
17 #include "services/shell/public/cpp/names.h" 17 #include "services/shell/public/cpp/names.h"
18 #include "url/gurl.h" 18 #include "url/gurl.h"
19 #include "url/url_util.h" 19 #include "url/url_util.h"
20 20
21 namespace catalog { 21 namespace catalog {
22 namespace { 22 namespace {
23 23
24 base::FilePath GetManifestPath(const base::FilePath& package_dir, 24 base::FilePath GetManifestPath(const base::FilePath& package_dir,
25 const std::string& name) { 25 const std::string& name) {
26 // TODO(beng): think more about how this should be done for exe targets. 26 // TODO(beng): think more about how this should be done for exe targets.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 EntryCache* catalog = is_system_catalog ? system_catalog_ : &user_catalog_; 273 EntryCache* catalog = is_system_catalog ? system_catalog_ : &user_catalog_;
274 if (catalog->end() != catalog->find(entry->name())) 274 if (catalog->end() != catalog->find(entry->name()))
275 return; 275 return;
276 for (auto child : entry->applications()) 276 for (auto child : entry->applications())
277 AddEntryToCatalog(make_scoped_ptr(child), is_system_catalog); 277 AddEntryToCatalog(make_scoped_ptr(child), is_system_catalog);
278 (*catalog)[entry->name()] = std::move(entry); 278 (*catalog)[entry->name()] = std::move(entry);
279 SerializeCatalog(); 279 SerializeCatalog();
280 } 280 }
281 281
282 } // namespace catalog 282 } // namespace catalog
OLDNEW
« no previous file with comments | « services/catalog/catalog.h ('k') | services/catalog/data/capabilities » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698