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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 if (!PathService::Get(base::DIR_MODULE, &cur)) | 347 if (!PathService::Get(base::DIR_MODULE, &cur)) |
348 return false; | 348 return false; |
349 cur = cur.Append(kO1DPluginFileName); | 349 cur = cur.Append(kO1DPluginFileName); |
350 break; | 350 break; |
351 case chrome::FILE_GTALK_PLUGIN: | 351 case chrome::FILE_GTALK_PLUGIN: |
352 if (!PathService::Get(base::DIR_MODULE, &cur)) | 352 if (!PathService::Get(base::DIR_MODULE, &cur)) |
353 return false; | 353 return false; |
354 cur = cur.Append(kGTalkPluginFileName); | 354 cur = cur.Append(kGTalkPluginFileName); |
355 break; | 355 break; |
356 #endif | 356 #endif |
357 #if defined(WIDEVINE_CDM_AVAILABLE) | 357 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
358 #if defined(WIDEVINE_CDM_IS_COMPONENT) | 358 #if defined(WIDEVINE_CDM_IS_COMPONENT) |
359 case chrome::DIR_COMPONENT_WIDEVINE_CDM: | 359 case chrome::DIR_COMPONENT_WIDEVINE_CDM: |
360 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 360 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
361 return false; | 361 return false; |
362 cur = cur.Append(kWidevineCdmBaseDirectory); | 362 cur = cur.Append(kWidevineCdmBaseDirectory); |
363 break; | 363 break; |
364 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) | 364 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) |
365 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. | 365 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. |
366 // In the component case, this is the source adapter. Otherwise, it is the | 366 // In the component case, this is the source adapter. Otherwise, it is the |
367 // actual Pepper module that gets loaded. | 367 // actual Pepper module that gets loaded. |
368 case chrome::FILE_WIDEVINE_CDM_ADAPTER: | 368 case chrome::FILE_WIDEVINE_CDM_ADAPTER: |
369 if (!GetInternalPluginsDirectory(&cur)) | 369 if (!GetInternalPluginsDirectory(&cur)) |
370 return false; | 370 return false; |
371 cur = cur.Append(kWidevineCdmAdapterFileName); | 371 cur = cur.Append(kWidevineCdmAdapterFileName); |
372 break; | 372 break; |
373 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 373 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
374 case chrome::FILE_RESOURCES_PACK: | 374 case chrome::FILE_RESOURCES_PACK: |
375 #if defined(OS_MACOSX) && !defined(OS_IOS) | 375 #if defined(OS_MACOSX) && !defined(OS_IOS) |
376 if (base::mac::AmIBundled()) { | 376 if (base::mac::AmIBundled()) { |
377 cur = base::mac::FrameworkBundlePath(); | 377 cur = base::mac::FrameworkBundlePath(); |
378 cur = cur.Append(FILE_PATH_LITERAL("Resources")) | 378 cur = cur.Append(FILE_PATH_LITERAL("Resources")) |
379 .Append(FILE_PATH_LITERAL("resources.pak")); | 379 .Append(FILE_PATH_LITERAL("resources.pak")); |
380 break; | 380 break; |
381 } | 381 } |
382 #elif defined(OS_ANDROID) | 382 #elif defined(OS_ANDROID) |
383 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) | 383 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 return true; | 527 return true; |
528 } | 528 } |
529 | 529 |
530 // This cannot be done as a static initializer sadly since Visual Studio will | 530 // This cannot be done as a static initializer sadly since Visual Studio will |
531 // eliminate this object file if there is no direct entry point into it. | 531 // eliminate this object file if there is no direct entry point into it. |
532 void RegisterPathProvider() { | 532 void RegisterPathProvider() { |
533 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 533 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
534 } | 534 } |
535 | 535 |
536 } // namespace chrome | 536 } // namespace chrome |
OLD | NEW |