| 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 23 matching lines...) Expand all Loading... |
| 34 break; | 34 break; |
| 35 case DIR_RECOVERY_BASE: | 35 case DIR_RECOVERY_BASE: |
| 36 cur = cur.Append(FILE_PATH_LITERAL("recovery")); | 36 cur = cur.Append(FILE_PATH_LITERAL("recovery")); |
| 37 break; | 37 break; |
| 38 case DIR_SWIFT_SHADER: | 38 case DIR_SWIFT_SHADER: |
| 39 cur = cur.Append(FILE_PATH_LITERAL("SwiftShader")); | 39 cur = cur.Append(FILE_PATH_LITERAL("SwiftShader")); |
| 40 break; | 40 break; |
| 41 case DIR_SW_REPORTER: | 41 case DIR_SW_REPORTER: |
| 42 cur = cur.Append(FILE_PATH_LITERAL("SwReporter")); | 42 cur = cur.Append(FILE_PATH_LITERAL("SwReporter")); |
| 43 break; | 43 break; |
| 44 case DIR_COMPONENT_EV_WHITELIST: |
| 45 cur = cur.Append(FILE_PATH_LITERAL("EVWhitelist")); |
| 46 break; |
| 44 default: | 47 default: |
| 45 return false; | 48 return false; |
| 46 } | 49 } |
| 47 | 50 |
| 48 *result = cur; | 51 *result = cur; |
| 49 return true; | 52 return true; |
| 50 } | 53 } |
| 51 | 54 |
| 52 // This cannot be done as a static initializer sadly since Visual Studio will | 55 // This cannot be done as a static initializer sadly since Visual Studio will |
| 53 // eliminate this object file if there is no direct entry point into it. | 56 // eliminate this object file if there is no direct entry point into it. |
| 54 void RegisterPathProvider(int components_root_key) { | 57 void RegisterPathProvider(int components_root_key) { |
| 55 DCHECK_EQ(g_components_root_key, -1); | 58 DCHECK_EQ(g_components_root_key, -1); |
| 56 DCHECK_GT(components_root_key, 0); | 59 DCHECK_GT(components_root_key, 0); |
| 57 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END); | 60 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END); |
| 58 | 61 |
| 59 g_components_root_key = components_root_key; | 62 g_components_root_key = components_root_key; |
| 60 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 63 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 61 } | 64 } |
| 62 | 65 |
| 63 } // namespace component_updater | 66 } // namespace component_updater |
| OLD | NEW |