OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <ext/hash_fun.h> |
| 6 #include <ext/hashtable.h> |
| 7 #include <stdbool.h> |
| 8 #include <stddef.h> |
| 9 #include <algorithm> |
| 10 #include <functional> |
| 11 #include <hash_map> |
| 12 #include <utility> |
| 13 #include <vector> |
| 14 |
| 15 #include "base/base_paths.h" |
| 16 #include "base/base_paths_mac.h" |
| 17 #include "base/basictypes.h" |
5 #include "base/path_service.h" | 18 #include "base/path_service.h" |
| 19 #include "build/build_config.h" |
6 | 20 |
7 #ifdef OS_WIN | 21 #ifdef OS_WIN |
8 #include <windows.h> | |
9 #include <shellapi.h> | 22 #include <shellapi.h> |
10 #include <shlobj.h> | 23 #include <shlobj.h> |
| 24 #include <windows.h> |
11 #endif | 25 #endif |
12 | 26 |
13 #include "base/file_path.h" | 27 #include "base/file_path.h" |
14 #include "base/file_util.h" | 28 #include "base/file_util.h" |
15 #include "base/hash_tables.h" | |
16 #include "base/lazy_instance.h" | 29 #include "base/lazy_instance.h" |
17 #include "base/logging.h" | 30 #include "base/logging.h" |
18 #include "base/synchronization/lock.h" | 31 #include "base/synchronization/lock.h" |
19 | 32 |
20 namespace base { | 33 namespace base { |
21 bool PathProvider(int key, FilePath* result); | 34 bool PathProvider(int key, FilePath* result); |
22 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
23 bool PathProviderWin(int key, FilePath* result); | 36 bool PathProviderWin(int key, FilePath* result); |
24 #elif defined(OS_MACOSX) | 37 #elif defined(OS_MACOSX) |
25 bool PathProviderMac(int key, FilePath* result); | 38 bool PathProviderMac(int key, FilePath* result); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 p = new Provider; | 272 p = new Provider; |
260 p->is_static = false; | 273 p->is_static = false; |
261 p->func = func; | 274 p->func = func; |
262 p->next = path_data->providers; | 275 p->next = path_data->providers; |
263 #ifndef NDEBUG | 276 #ifndef NDEBUG |
264 p->key_start = key_start; | 277 p->key_start = key_start; |
265 p->key_end = key_end; | 278 p->key_end = key_end; |
266 #endif | 279 #endif |
267 path_data->providers = p; | 280 path_data->providers = p; |
268 } | 281 } |
OLD | NEW |