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