OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 "chrome/common/chrome_paths.h" | 5 #include "chrome/common/chrome_paths.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 case chrome::DIR_BOOKMARK_MANAGER: | 124 case chrome::DIR_BOOKMARK_MANAGER: |
125 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 125 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
126 return false; | 126 return false; |
127 cur = cur.Append(FILE_PATH_LITERAL("bookmark_manager")); | 127 cur = cur.Append(FILE_PATH_LITERAL("bookmark_manager")); |
128 break; | 128 break; |
129 case chrome::DIR_INSPECTOR: | 129 case chrome::DIR_INSPECTOR: |
130 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 130 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
131 return false; | 131 return false; |
132 cur = cur.Append(FILE_PATH_LITERAL("inspector")); | 132 cur = cur.Append(FILE_PATH_LITERAL("inspector")); |
133 break; | 133 break; |
| 134 case chrome::DIR_NET_INTERNALS: |
| 135 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 136 return false; |
| 137 cur = cur.Append(FILE_PATH_LITERAL("net_internals")); |
| 138 break; |
134 case chrome::DIR_APP_DICTIONARIES: | 139 case chrome::DIR_APP_DICTIONARIES: |
135 #if defined(OS_LINUX) || defined(OS_MACOSX) | 140 #if defined(OS_LINUX) || defined(OS_MACOSX) |
136 // We can't write into the EXE dir on Linux, so keep dictionaries | 141 // We can't write into the EXE dir on Linux, so keep dictionaries |
137 // alongside the safe browsing database in the user data dir. | 142 // alongside the safe browsing database in the user data dir. |
138 // And we don't want to write into the bundle on the Mac, so push | 143 // And we don't want to write into the bundle on the Mac, so push |
139 // it to the user data dir there also. | 144 // it to the user data dir there also. |
140 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 145 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
141 return false; | 146 return false; |
142 #else | 147 #else |
143 if (!PathService::Get(base::DIR_EXE, &cur)) | 148 if (!PathService::Get(base::DIR_EXE, &cur)) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 return true; | 225 return true; |
221 } | 226 } |
222 | 227 |
223 // This cannot be done as a static initializer sadly since Visual Studio will | 228 // This cannot be done as a static initializer sadly since Visual Studio will |
224 // eliminate this object file if there is no direct entry point into it. | 229 // eliminate this object file if there is no direct entry point into it. |
225 void RegisterPathProvider() { | 230 void RegisterPathProvider() { |
226 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 231 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
227 } | 232 } |
228 | 233 |
229 } // namespace chrome | 234 } // namespace chrome |
OLD | NEW |