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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 cur = cur.Append(FILE_PATH_LITERAL("plugins")); | 165 cur = cur.Append(FILE_PATH_LITERAL("plugins")); |
166 cur = cur.Append(FILE_PATH_LITERAL("gears")); | 166 cur = cur.Append(FILE_PATH_LITERAL("gears")); |
167 cur = cur.Append(FILE_PATH_LITERAL("gears.dll")); | 167 cur = cur.Append(FILE_PATH_LITERAL("gears.dll")); |
168 } | 168 } |
169 #else | 169 #else |
170 // No gears.dll on non-Windows systems. | 170 // No gears.dll on non-Windows systems. |
171 return false; | 171 return false; |
172 #endif | 172 #endif |
173 } | 173 } |
174 break; | 174 break; |
| 175 #if defined(OS_CHROMEOS) |
| 176 case chrome::FILE_CHROMEOS_API: |
| 177 if (!PathService::Get(base::DIR_MODULE, &cur)) |
| 178 return false; |
| 179 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); |
| 180 cur = cur.Append(FILE_PATH_LITERAL("libchromeos-power.so")); |
| 181 break; |
| 182 #endif |
175 // The following are only valid in the development environment, and | 183 // The following are only valid in the development environment, and |
176 // will fail if executed from an installed executable (because the | 184 // will fail if executed from an installed executable (because the |
177 // generated path won't exist). | 185 // generated path won't exist). |
178 case chrome::DIR_TEST_DATA: | 186 case chrome::DIR_TEST_DATA: |
179 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) | 187 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) |
180 return false; | 188 return false; |
181 cur = cur.Append(FILE_PATH_LITERAL("chrome")); | 189 cur = cur.Append(FILE_PATH_LITERAL("chrome")); |
182 cur = cur.Append(FILE_PATH_LITERAL("test")); | 190 cur = cur.Append(FILE_PATH_LITERAL("test")); |
183 cur = cur.Append(FILE_PATH_LITERAL("data")); | 191 cur = cur.Append(FILE_PATH_LITERAL("data")); |
184 if (!file_util::PathExists(cur)) // we don't want to create this | 192 if (!file_util::PathExists(cur)) // we don't want to create this |
(...skipping 20 matching lines...) Expand all Loading... |
205 return true; | 213 return true; |
206 } | 214 } |
207 | 215 |
208 // This cannot be done as a static initializer sadly since Visual Studio will | 216 // This cannot be done as a static initializer sadly since Visual Studio will |
209 // eliminate this object file if there is no direct entry point into it. | 217 // eliminate this object file if there is no direct entry point into it. |
210 void RegisterPathProvider() { | 218 void RegisterPathProvider() { |
211 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 219 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
212 } | 220 } |
213 | 221 |
214 } // namespace chrome | 222 } // namespace chrome |
OLD | NEW |