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

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

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
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 | « mojo/services/catalog/catalog.h ('k') | mojo/services/catalog/entry.h » ('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 "mojo/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 "mojo/services/catalog/entry.h"
15 #include "mojo/services/catalog/manifest_provider.h" 15 #include "mojo/services/catalog/manifest_provider.h"
16 #include "mojo/services/catalog/store.h" 16 #include "mojo/services/catalog/store.h"
17 #include "mojo/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.
27 std::string type = mojo::GetNameType(name); 27 std::string type = mojo::GetNameType(name);
(...skipping 245 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 | « mojo/services/catalog/catalog.h ('k') | mojo/services/catalog/entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698