OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // it to the user data dir there also. | 245 // it to the user data dir there also. |
246 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 246 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
247 return false; | 247 return false; |
248 #else | 248 #else |
249 if (!PathService::Get(base::DIR_EXE, &cur)) | 249 if (!PathService::Get(base::DIR_EXE, &cur)) |
250 return false; | 250 return false; |
251 #endif | 251 #endif |
252 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); | 252 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); |
253 create_dir = true; | 253 create_dir = true; |
254 break; | 254 break; |
255 case chrome::DIR_USER_DATA_TEMP: | |
256 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | |
257 return false; | |
258 cur = cur.Append(FILE_PATH_LITERAL("Temp")); | |
259 break; | |
260 case chrome::DIR_INTERNAL_PLUGINS: | 255 case chrome::DIR_INTERNAL_PLUGINS: |
261 if (!GetInternalPluginsDirectory(&cur)) | 256 if (!GetInternalPluginsDirectory(&cur)) |
262 return false; | 257 return false; |
263 break; | 258 break; |
264 case chrome::DIR_PEPPER_FLASH_PLUGIN: | 259 case chrome::DIR_PEPPER_FLASH_PLUGIN: |
265 if (!GetInternalPluginsDirectory(&cur)) | 260 if (!GetInternalPluginsDirectory(&cur)) |
266 return false; | 261 return false; |
267 cur = cur.Append(kPepperFlashBaseDirectory); | 262 cur = cur.Append(kPepperFlashBaseDirectory); |
268 break; | 263 break; |
269 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN: | 264 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN: |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 return true; | 475 return true; |
481 } | 476 } |
482 | 477 |
483 // This cannot be done as a static initializer sadly since Visual Studio will | 478 // This cannot be done as a static initializer sadly since Visual Studio will |
484 // eliminate this object file if there is no direct entry point into it. | 479 // eliminate this object file if there is no direct entry point into it. |
485 void RegisterPathProvider() { | 480 void RegisterPathProvider() { |
486 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 481 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
487 } | 482 } |
488 | 483 |
489 } // namespace chrome | 484 } // namespace chrome |
OLD | NEW |