summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths.cc
diff options
context:
space:
mode:
authorbenm@chromium.org <benm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 12:43:29 +0000
committerbenm@chromium.org <benm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 12:43:29 +0000
commitf152b67b5802543986e37a9f57e228e424786e84 (patch)
tree6b882ebd754e1ebe91c8b8561984c6089413eb13 /chrome/common/chrome_paths.cc
parenta94ba89aeec548f475b3e37eeb4ffbc5369c999c (diff)
downloadchromium_src-f152b67b5802543986e37a9f57e228e424786e84.zip
chromium_src-f152b67b5802543986e37a9f57e228e424786e84.tar.gz
chromium_src-f152b67b5802543986e37a9f57e228e424786e84.tar.bz2
Android requires some extra functionality to set the path to it's resource pak files and native libraries.
This patch adds a new value to the PathService to implement the resource pak override and update the places that load pak files to take advantage of it. Also adds a function for embedders to set the path to native libraries. Review URL: https://chromiumcodereview.appspot.com/10802065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r--chrome/common/chrome_paths.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 9409bd4..8d1dca6 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -13,6 +13,7 @@
#include "base/version.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
+#include "ui/base/ui_base_paths.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
@@ -312,11 +313,15 @@ bool PathProvider(int key, FilePath* result) {
.Append(FILE_PATH_LITERAL("resources.pak"));
break;
}
- // If we're not bundled on mac, resources.pak should be next to the
- // binary (e.g., for unit tests).
-#endif
+#elif defined(OS_ANDROID)
+ if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur))
+ return false;
+#else
+ // If we're not bundled on mac or Android, resources.pak should be next
+ // to the binary (e.g., for unit tests).
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
+#endif
cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
break;
case chrome::DIR_RESOURCES_EXTENSION: