#include "chrome/common/chrome_paths.h"
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
#if defined(OS_ANDROID)
#include "base/android/path_utils.h"
+#include "base/base_paths_android.h"
#endif
#if defined(OS_MACOSX)
FILE_PATH_LITERAL("libpdf.so");
#endif
-// File name of the internal NaCl plugin on different platforms.
const base::FilePath::CharType kInternalNaClPluginFileName[] =
-#if defined(OS_WIN)
- FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
-#elif defined(OS_MACOSX)
- // TODO(noelallen) Please verify this extention name is correct.
- FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
-#else // Linux and Chrome OS
- FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
-#endif
+ FILE_PATH_LITERAL("internal-nacl-plugin");
const base::FilePath::CharType kEffectsPluginFileName[] =
#if defined(OS_WIN)
return false;
cur = cur.Append(kEffectsPluginFileName);
break;
+ // TODO(teravest): Remove this case once the internal NaCl plugin is gone.
+ // We currently need a path here to look up whether the plugin is disabled
+ // and what its permissions are.
case chrome::FILE_NACL_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
break;
- case chrome::DIR_RECOVERY_BASE:
- if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
- return false;
- cur = cur.Append(FILE_PATH_LITERAL("recovery"));
- create_dir = true;
- break;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
case chrome::FILE_O1D_PLUGIN:
if (!PathService::Get(base::DIR_MODULE, &cur))
cur = cur.Append(kGTalkPluginFileName);
break;
#endif
-#if defined(CLD2_IS_COMPONENT)
- case chrome::DIR_COMPONENT_CLD2:
- if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
- return false;
- cur = cur.Append(FILE_PATH_LITERAL("CLD"));
- break;
-#endif // defined(CLD2_IS_COMPONENT)
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_IS_COMPONENT)
case chrome::DIR_COMPONENT_WIDEVINE_CDM:
break;
#endif
#if defined(OS_LINUX) && defined(ENABLE_MANAGED_USERS)
- case chrome::DIR_MANAGED_USERS_DEFAULT_APPS:
+ case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS:
if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur))
return false;
cur = cur.Append(FILE_PATH_LITERAL("managed_users"));
// will fail if executed from an installed executable (because the
// generated path won't exist).
case chrome::DIR_GEN_TEST_DATA:
+#if defined(OS_ANDROID)
+ // On Android, our tests don't have permission to write to DIR_MODULE.
+ // gtest/test_runner.py pushes data to external storage.
+ if (!PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &cur))
+ return false;
+#else
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
+#endif
cur = cur.Append(FILE_PATH_LITERAL("test_data"));
if (!base::PathExists(cur)) // We don't want to create this.
return false;
cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
break;
#endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
+#if !defined(OS_ANDROID)
+ case chrome::DIR_GLOBAL_GCM_STORE:
+ if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
+ return false;
+ cur = cur.Append(kGCMStoreDirname);
+ break;
+#endif // !defined(OS_ANDROID)
default:
return false;