| 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 "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_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 break; | 124 break; |
| 125 case chrome::DIR_APP_DICTIONARIES: | 125 case chrome::DIR_APP_DICTIONARIES: |
| 126 if (!PathService::Get(base::DIR_EXE, &cur)) | 126 if (!PathService::Get(base::DIR_EXE, &cur)) |
| 127 return false; | 127 return false; |
| 128 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); | 128 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); |
| 129 create_dir = true; | 129 create_dir = true; |
| 130 break; | 130 break; |
| 131 case chrome::FILE_LOCAL_STATE: | 131 case chrome::FILE_LOCAL_STATE: |
| 132 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 132 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 133 return false; | 133 return false; |
| 134 cur = cur.AppendASCII(WideToASCII(chrome::kLocalStateFilename)); | 134 cur = cur.Append(chrome::kLocalStateFilename); |
| 135 break; | 135 break; |
| 136 case chrome::FILE_RECORDED_SCRIPT: | 136 case chrome::FILE_RECORDED_SCRIPT: |
| 137 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 137 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 138 return false; | 138 return false; |
| 139 cur = cur.Append(FILE_PATH_LITERAL("script.log")); | 139 cur = cur.Append(FILE_PATH_LITERAL("script.log")); |
| 140 break; | 140 break; |
| 141 case chrome::FILE_GEARS_PLUGIN: | 141 case chrome::FILE_GEARS_PLUGIN: |
| 142 if (!GetGearsPluginPathFromCommandLine(&cur)) { | 142 if (!GetGearsPluginPathFromCommandLine(&cur)) { |
| 143 // Search for gears.dll alongside chrome.dll first. This new model | 143 // Search for gears.dll alongside chrome.dll first. This new model |
| 144 // allows us to package gears.dll with the Chrome installer and update | 144 // allows us to package gears.dll with the Chrome installer and update |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 221 } |
| 222 | 222 |
| 223 // This cannot be done as a static initializer sadly since Visual Studio will | 223 // 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. | 224 // eliminate this object file if there is no direct entry point into it. |
| 225 void RegisterPathProvider() { | 225 void RegisterPathProvider() { |
| 226 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 226 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace chrome | 229 } // namespace chrome |
| 230 | 230 |
| OLD | NEW |