OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/component_updater/component_updater_paths.h" | 5 #include "components/component_updater/component_updater_paths.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 | 9 |
10 namespace component_updater { | 10 namespace component_updater { |
(...skipping 11 matching lines...) Expand all Loading... |
22 switch (key) { | 22 switch (key) { |
23 case DIR_COMPONENT_CLD2: | 23 case DIR_COMPONENT_CLD2: |
24 cur = cur.Append(FILE_PATH_LITERAL("CLD")); | 24 cur = cur.Append(FILE_PATH_LITERAL("CLD")); |
25 break; | 25 break; |
26 case DIR_RECOVERY_BASE: | 26 case DIR_RECOVERY_BASE: |
27 cur = cur.Append(FILE_PATH_LITERAL("recovery")); | 27 cur = cur.Append(FILE_PATH_LITERAL("recovery")); |
28 break; | 28 break; |
29 case DIR_SWIFT_SHADER: | 29 case DIR_SWIFT_SHADER: |
30 cur = cur.Append(FILE_PATH_LITERAL("SwiftShader")); | 30 cur = cur.Append(FILE_PATH_LITERAL("SwiftShader")); |
31 break; | 31 break; |
| 32 case DIR_SW_REPORTER: |
| 33 cur = cur.Append(FILE_PATH_LITERAL("SwReporter")); |
| 34 break; |
32 default: | 35 default: |
33 return false; | 36 return false; |
34 } | 37 } |
35 | 38 |
36 *result = cur; | 39 *result = cur; |
37 return true; | 40 return true; |
38 } | 41 } |
39 | 42 |
40 // This cannot be done as a static initializer sadly since Visual Studio will | 43 // This cannot be done as a static initializer sadly since Visual Studio will |
41 // eliminate this object file if there is no direct entry point into it. | 44 // eliminate this object file if there is no direct entry point into it. |
42 void RegisterPathProvider(const base::FilePath& components_root) { | 45 void RegisterPathProvider(const base::FilePath& components_root) { |
43 DCHECK(g_components_root.Get().empty()); | 46 DCHECK(g_components_root.Get().empty()); |
44 DCHECK(!components_root.empty()); | 47 DCHECK(!components_root.empty()); |
45 g_components_root.Get() = components_root; | 48 g_components_root.Get() = components_root; |
46 | 49 |
47 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 50 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
48 } | 51 } |
49 | 52 |
50 } // namespace component_updater | 53 } // namespace component_updater |
OLD | NEW |