| 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 29 matching lines...) Expand all Loading... |
| 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: | 44 case DIR_COMPONENT_EV_WHITELIST: |
| 45 cur = cur.Append(FILE_PATH_LITERAL("EVWhitelist")); | 45 cur = cur.Append(FILE_PATH_LITERAL("EVWhitelist")); |
| 46 break; | 46 break; |
| 47 case DIR_SUPERVISED_USER_WHITELISTS: | 47 case DIR_SUPERVISED_USER_WHITELISTS: |
| 48 cur = cur.Append(FILE_PATH_LITERAL("SupervisedUserWhitelists")); | 48 cur = cur.Append(FILE_PATH_LITERAL("SupervisedUserWhitelists")); |
| 49 break; | 49 break; |
| 50 case DIR_CERT_TRANS_TREE_STATES: |
| 51 cur = cur.Append(FILE_PATH_LITERAL("CertificateTransparency")); |
| 52 break; |
| 50 default: | 53 default: |
| 51 return false; | 54 return false; |
| 52 } | 55 } |
| 53 | 56 |
| 54 *result = cur; | 57 *result = cur; |
| 55 return true; | 58 return true; |
| 56 } | 59 } |
| 57 | 60 |
| 58 // This cannot be done as a static initializer sadly since Visual Studio will | 61 // This cannot be done as a static initializer sadly since Visual Studio will |
| 59 // eliminate this object file if there is no direct entry point into it. | 62 // eliminate this object file if there is no direct entry point into it. |
| 60 void RegisterPathProvider(int components_root_key) { | 63 void RegisterPathProvider(int components_root_key) { |
| 61 DCHECK_EQ(g_components_root_key, -1); | 64 DCHECK_EQ(g_components_root_key, -1); |
| 62 DCHECK_GT(components_root_key, 0); | 65 DCHECK_GT(components_root_key, 0); |
| 63 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END); | 66 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END); |
| 64 | 67 |
| 65 g_components_root_key = components_root_key; | 68 g_components_root_key = components_root_key; |
| 66 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 69 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 67 } | 70 } |
| 68 | 71 |
| 69 } // namespace component_updater | 72 } // namespace component_updater |
| OLD | NEW |