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

Side by Side Diff: services/catalog/public/cpp/resource_loader.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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/public/cpp/BUILD.gn ('k') | services/catalog/reader.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 "services/catalog/public/cpp/resource_loader.h" 5 #include "services/catalog/public/cpp/resource_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file.h" 11 #include "base/files/file.h"
12 #include "components/filesystem/public/interfaces/directory.mojom.h" 12 #include "components/filesystem/public/interfaces/directory.mojom.h"
13 #include "mojo/public/cpp/system/platform_handle.h" 13 #include "mojo/public/cpp/system/platform_handle.h"
14 #include "services/shell/public/cpp/connector.h" 14 #include "services/service_manager/public/cpp/connector.h"
15 #include "services/shell/public/interfaces/interface_provider.mojom.h" 15 #include "services/service_manager/public/interfaces/interface_provider.mojom.h"
16 16
17 namespace catalog { 17 namespace catalog {
18 18
19 namespace { 19 namespace {
20 20
21 base::File GetFileFromHandle(mojo::ScopedHandle handle) { 21 base::File GetFileFromHandle(mojo::ScopedHandle handle) {
22 CHECK(handle.is_valid()); 22 CHECK(handle.is_valid());
23 base::PlatformFile platform_file; 23 base::PlatformFile platform_file;
24 CHECK_EQ(mojo::UnwrapPlatformFile(std::move(handle), &platform_file), 24 CHECK_EQ(mojo::UnwrapPlatformFile(std::move(handle), &platform_file),
25 MOJO_RESULT_OK); 25 MOJO_RESULT_OK);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return true; 57 return true;
58 } 58 }
59 59
60 base::File ResourceLoader::TakeFile(const std::string& path) { 60 base::File ResourceLoader::TakeFile(const std::string& path) {
61 std::unique_ptr<base::File> file_wrapper(std::move(resource_map_[path])); 61 std::unique_ptr<base::File> file_wrapper(std::move(resource_map_[path]));
62 resource_map_.erase(path); 62 resource_map_.erase(path);
63 return std::move(*file_wrapper); 63 return std::move(*file_wrapper);
64 } 64 }
65 65
66 } // namespace catalog 66 } // namespace catalog
OLDNEW
« no previous file with comments | « services/catalog/public/cpp/BUILD.gn ('k') | services/catalog/reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698