Skip to content

Commit

Permalink
fuchsia: More fiddling with base_paths
Browse files Browse the repository at this point in the history
Move FILE_EXE/_MODULE back to being in /system. That's where the test
data currently is (rather than the aspirational location of
/pkg/bin/...) so tell base about it, so that tests are able to load data
file that are currently loaded relative to DIR_EXE.

Bug: 706592
Change-Id: I5c13af84b1c90fdf4357756fe4d821f21e2cd68b
Reviewed-on: https://chromium-review.googlesource.com/523851
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477370}
  • Loading branch information
sgraham authored and Commit Bot committed Jun 6, 2017
1 parent 500f75b commit bc44f1e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions base/base_paths_fuchsia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ bool PathProviderFuchsia(int key, FilePath* result) {
// correct as fixed paths like this. See https://crbug.com/726124.
switch (key) {
case FILE_EXE:
*result = FilePath("/pkg/bin/chrome");
return true;
case FILE_MODULE:
*result = FilePath("/pkg/lib/chrome");
// TODO(fuchsia): This is incorrect per
// https://fuchsia.googlesource.com/docs/+/master/namespaces.md, and
// should be /pkg/{bin,lib}/something. However, binaries are currently run
// by packing them into the system bootfs rather than running a "real"
// installer (which doesn't currently exist). Additionally, to the
// installer not existing, mmap() currently only works on bootfs file
// systems (like /system) but won't for files installed dynamically in
// other locations on other types of file systems. So, for now, we use
// /system/ as the location for everything.
*result = FilePath("/system/chrome");
return true;
case DIR_SOURCE_ROOT:
// This is only used for tests, so we return the binary location for now.
Expand Down

0 comments on commit bc44f1e

Please sign in to comment.