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/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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 cur = cur.DirName(); | 345 cur = cur.DirName(); |
346 cur = cur.DirName(); | 346 cur = cur.DirName(); |
347 cur = cur.DirName(); | 347 cur = cur.DirName(); |
348 } | 348 } |
349 #else | 349 #else |
350 if (!GetInternalPluginsDirectory(&cur)) | 350 if (!GetInternalPluginsDirectory(&cur)) |
351 return false; | 351 return false; |
352 #endif | 352 #endif |
353 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); | 353 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); |
354 break; | 354 break; |
355 case chrome::DIR_RECOVERY_BASE: | |
356 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | |
357 return false; | |
358 cur = cur.Append(FILE_PATH_LITERAL("recovery")); | |
359 create_dir = true; | |
360 break; | |
361 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 355 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
362 case chrome::FILE_O1D_PLUGIN: | 356 case chrome::FILE_O1D_PLUGIN: |
363 if (!PathService::Get(base::DIR_MODULE, &cur)) | 357 if (!PathService::Get(base::DIR_MODULE, &cur)) |
364 return false; | 358 return false; |
365 cur = cur.Append(kO1DPluginFileName); | 359 cur = cur.Append(kO1DPluginFileName); |
366 break; | 360 break; |
367 case chrome::FILE_GTALK_PLUGIN: | 361 case chrome::FILE_GTALK_PLUGIN: |
368 if (!PathService::Get(base::DIR_MODULE, &cur)) | 362 if (!PathService::Get(base::DIR_MODULE, &cur)) |
369 return false; | 363 return false; |
370 cur = cur.Append(kGTalkPluginFileName); | 364 cur = cur.Append(kGTalkPluginFileName); |
371 break; | 365 break; |
372 #endif | 366 #endif |
373 case chrome::DIR_COMPONENT_CLD2: | |
374 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | |
375 return false; | |
376 cur = cur.Append(FILE_PATH_LITERAL("CLD")); | |
377 break; | |
378 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 367 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
379 #if defined(WIDEVINE_CDM_IS_COMPONENT) | 368 #if defined(WIDEVINE_CDM_IS_COMPONENT) |
380 case chrome::DIR_COMPONENT_WIDEVINE_CDM: | 369 case chrome::DIR_COMPONENT_WIDEVINE_CDM: |
381 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 370 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
382 return false; | 371 return false; |
383 cur = cur.Append(kWidevineCdmBaseDirectory); | 372 cur = cur.Append(kWidevineCdmBaseDirectory); |
384 break; | 373 break; |
385 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) | 374 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) |
386 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. | 375 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. |
387 // In the component case, this is the source adapter. Otherwise, it is the | 376 // In the component case, this is the source adapter. Otherwise, it is the |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 596 |
608 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 597 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
609 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 598 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
610 } | 599 } |
611 | 600 |
612 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 601 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
613 return g_invalid_specified_user_data_dir.Get(); | 602 return g_invalid_specified_user_data_dir.Get(); |
614 } | 603 } |
615 | 604 |
616 } // namespace chrome | 605 } // namespace chrome |
OLD | NEW |