OLD | NEW |
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/service_manager/service_overrides.h" | 5 #include "services/service_manager/service_overrides.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 | 11 |
12 namespace shell { | 12 namespace service_manager { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 const char kExecutablePathKey[] = "executable_path"; | 16 const char kExecutablePathKey[] = "executable_path"; |
17 const char kPackageNameKey[] = "package_name"; | 17 const char kPackageNameKey[] = "package_name"; |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 ServiceOverrides::Entry::Entry() {} | 21 ServiceOverrides::Entry::Entry() {} |
22 | 22 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const std::string& service_name, | 68 const std::string& service_name, |
69 base::FilePath* path) const { | 69 base::FilePath* path) const { |
70 auto iter = entries_.find(service_name); | 70 auto iter = entries_.find(service_name); |
71 if (iter == entries_.end() || iter->second.executable_path.empty()) | 71 if (iter == entries_.end() || iter->second.executable_path.empty()) |
72 return false; | 72 return false; |
73 | 73 |
74 *path = iter->second.executable_path; | 74 *path = iter->second.executable_path; |
75 return true; | 75 return true; |
76 } | 76 } |
77 | 77 |
78 } // namespace shell | 78 } // namespace service_manager |
OLD | NEW |