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/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 if (!GetInternalPluginsDirectory(&cur)) | 338 if (!GetInternalPluginsDirectory(&cur)) |
339 return false; | 339 return false; |
340 #endif | 340 #endif |
341 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); | 341 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); |
342 break; | 342 break; |
343 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 343 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
344 #if defined(WIDEVINE_CDM_IS_COMPONENT) | 344 #if defined(WIDEVINE_CDM_IS_COMPONENT) |
345 case chrome::DIR_COMPONENT_WIDEVINE_CDM: | 345 case chrome::DIR_COMPONENT_WIDEVINE_CDM: |
346 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 346 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
347 return false; | 347 return false; |
348 cur = cur.AppendASCII(kWidevineCdmBaseDirectory); | 348 cur = cur.Append(FILE_PATH_LITERAL("WidevineCDM")); |
349 break; | 349 break; |
350 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) | 350 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) |
351 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. | 351 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. |
352 // In the component case, this is the source adapter. Otherwise, it is the | 352 // In the component case, this is the source adapter. Otherwise, it is the |
353 // actual Pepper module that gets loaded. | 353 // actual Pepper module that gets loaded. |
354 case chrome::FILE_WIDEVINE_CDM_ADAPTER: | 354 case chrome::FILE_WIDEVINE_CDM_ADAPTER: |
355 if (!GetInternalPluginsDirectory(&cur)) | 355 if (!GetInternalPluginsDirectory(&cur)) |
356 return false; | 356 return false; |
357 cur = cur.AppendASCII(kWidevineCdmBaseDirectory); | |
358 cur = cur.AppendASCII(kWidevineCdmAdapterFileName); | 357 cur = cur.AppendASCII(kWidevineCdmAdapterFileName); |
359 break; | 358 break; |
360 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 359 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
361 case chrome::FILE_RESOURCES_PACK: | 360 case chrome::FILE_RESOURCES_PACK: |
362 #if defined(OS_MACOSX) | 361 #if defined(OS_MACOSX) |
363 cur = base::mac::FrameworkBundlePath(); | 362 cur = base::mac::FrameworkBundlePath(); |
364 cur = cur.Append(FILE_PATH_LITERAL("Resources")) | 363 cur = cur.Append(FILE_PATH_LITERAL("Resources")) |
365 .Append(FILE_PATH_LITERAL("resources.pak")); | 364 .Append(FILE_PATH_LITERAL("resources.pak")); |
366 break; | 365 break; |
367 #elif defined(OS_ANDROID) | 366 #elif defined(OS_ANDROID) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 566 |
568 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 567 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
569 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 568 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
570 } | 569 } |
571 | 570 |
572 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 571 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
573 return g_invalid_specified_user_data_dir.Get(); | 572 return g_invalid_specified_user_data_dir.Get(); |
574 } | 573 } |
575 | 574 |
576 } // namespace chrome | 575 } // namespace chrome |
OLD | NEW |