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 #ifndef SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ |
6 #define SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ | 6 #define SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 | 15 |
16 namespace shell { | 16 namespace service_manager { |
17 | 17 |
18 class ServiceOverrides { | 18 class ServiceOverrides { |
19 public: | 19 public: |
20 struct Entry { | 20 struct Entry { |
21 Entry(); | 21 Entry(); |
22 ~Entry(); | 22 ~Entry(); |
23 | 23 |
24 base::FilePath executable_path; | 24 base::FilePath executable_path; |
25 std::string package_name; | 25 std::string package_name; |
26 }; | 26 }; |
27 | 27 |
28 explicit ServiceOverrides(std::unique_ptr<base::Value> overrides); | 28 explicit ServiceOverrides(std::unique_ptr<base::Value> overrides); |
29 ~ServiceOverrides(); | 29 ~ServiceOverrides(); |
30 | 30 |
31 bool GetExecutablePathOverride(const std::string& service_name, | 31 bool GetExecutablePathOverride(const std::string& service_name, |
32 base::FilePath* path) const; | 32 base::FilePath* path) const; |
33 | 33 |
34 const std::map<std::string, Entry>& entries() const { return entries_; } | 34 const std::map<std::string, Entry>& entries() const { return entries_; } |
35 | 35 |
36 private: | 36 private: |
37 std::map<std::string, Entry> entries_; | 37 std::map<std::string, Entry> entries_; |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(ServiceOverrides); | 39 DISALLOW_COPY_AND_ASSIGN(ServiceOverrides); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace shell | 42 } // namespace service_manager |
43 | 43 |
44 #endif // SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ | 44 #endif // SERVICES_SERVICE_MANAGER_SERVICE_OVERRIDES_H_ |
OLD | NEW |