| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/path_service.h" | 5 #include "base/path_service.h" |
| 6 | 6 |
| 7 #ifdef OS_WIN | 7 #ifdef OS_WIN |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #endif | 78 #endif |
| 79 true | 79 true |
| 80 }; | 80 }; |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 #if defined(OS_ANDROID) | 83 #if defined(OS_ANDROID) |
| 84 Provider base_provider_android = { | 84 Provider base_provider_android = { |
| 85 base::PathProviderAndroid, | 85 base::PathProviderAndroid, |
| 86 &base_provider, | 86 &base_provider, |
| 87 #ifndef NDEBUG | 87 #ifndef NDEBUG |
| 88 0, | 88 PATH_ANDROID_START, |
| 89 0, | 89 PATH_ANDROID_END, |
| 90 #endif | 90 #endif |
| 91 true | 91 true |
| 92 }; | 92 }; |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 95 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 96 Provider base_provider_posix = { | 96 Provider base_provider_posix = { |
| 97 base::PathProviderPosix, | 97 base::PathProviderPosix, |
| 98 &base_provider, | 98 &base_provider, |
| 99 #ifndef NDEBUG | 99 #ifndef NDEBUG |
| 100 0, | 100 PATH_POSIX_START, |
| 101 0, | 101 PATH_POSIX_END, |
| 102 #endif | 102 #endif |
| 103 true | 103 true |
| 104 }; | 104 }; |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 | 107 |
| 108 struct PathData { | 108 struct PathData { |
| 109 base::Lock lock; | 109 base::Lock lock; |
| 110 PathMap cache; // Cache mappings from path key to path value. | 110 PathMap cache; // Cache mappings from path key to path value. |
| 111 PathMap overrides; // Track path overrides. | 111 PathMap overrides; // Track path overrides. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 p = new Provider; | 286 p = new Provider; |
| 287 p->is_static = false; | 287 p->is_static = false; |
| 288 p->func = func; | 288 p->func = func; |
| 289 p->next = path_data->providers; | 289 p->next = path_data->providers; |
| 290 #ifndef NDEBUG | 290 #ifndef NDEBUG |
| 291 p->key_start = key_start; | 291 p->key_start = key_start; |
| 292 p->key_end = key_end; | 292 p->key_end = key_end; |
| 293 #endif | 293 #endif |
| 294 path_data->providers = p; | 294 path_data->providers = p; |
| 295 } | 295 } |
| OLD | NEW |