| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 case chrome::DIR_BOOKMARK_MANAGER: | 161 case chrome::DIR_BOOKMARK_MANAGER: |
| 162 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 162 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 163 return false; | 163 return false; |
| 164 cur = cur.Append(FILE_PATH_LITERAL("bookmark_manager")); | 164 cur = cur.Append(FILE_PATH_LITERAL("bookmark_manager")); |
| 165 break; | 165 break; |
| 166 case chrome::DIR_INSPECTOR: | 166 case chrome::DIR_INSPECTOR: |
| 167 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 167 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 168 return false; | 168 return false; |
| 169 cur = cur.Append(FILE_PATH_LITERAL("inspector")); | 169 cur = cur.Append(FILE_PATH_LITERAL("inspector")); |
| 170 break; | 170 break; |
| 171 case chrome::DIR_NET_INTERNALS: |
| 172 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 173 return false; |
| 174 cur = cur.Append(FILE_PATH_LITERAL("net_internals")); |
| 175 break; |
| 171 case chrome::DIR_APP_DICTIONARIES: | 176 case chrome::DIR_APP_DICTIONARIES: |
| 172 #if defined(OS_LINUX) || defined(OS_MACOSX) | 177 #if defined(OS_LINUX) || defined(OS_MACOSX) |
| 173 // We can't write into the EXE dir on Linux, so keep dictionaries | 178 // We can't write into the EXE dir on Linux, so keep dictionaries |
| 174 // alongside the safe browsing database in the user data dir. | 179 // alongside the safe browsing database in the user data dir. |
| 175 // And we don't want to write into the bundle on the Mac, so push | 180 // And we don't want to write into the bundle on the Mac, so push |
| 176 // it to the user data dir there also. | 181 // it to the user data dir there also. |
| 177 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 182 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 178 return false; | 183 return false; |
| 179 #else | 184 #else |
| 180 if (!PathService::Get(base::DIR_EXE, &cur)) | 185 if (!PathService::Get(base::DIR_EXE, &cur)) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return true; | 295 return true; |
| 291 } | 296 } |
| 292 | 297 |
| 293 // This cannot be done as a static initializer sadly since Visual Studio will | 298 // This cannot be done as a static initializer sadly since Visual Studio will |
| 294 // eliminate this object file if there is no direct entry point into it. | 299 // eliminate this object file if there is no direct entry point into it. |
| 295 void RegisterPathProvider() { | 300 void RegisterPathProvider() { |
| 296 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 301 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 297 } | 302 } |
| 298 | 303 |
| 299 } // namespace chrome | 304 } // namespace chrome |
| OLD | NEW |