blob: 6660823ffe6efc41f55f9d7492fb58f785eb664a [file] [log] [blame]
scottmg1ab7aa82017-05-25 05:22:491// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/base_paths.h"
6
7#include "base/files/file_path.h"
8
9namespace base {
10
11bool PathProviderFuchsia(int key, FilePath* result) {
Scott Graham4bd2b07f2017-06-01 04:17:0412 // TODO(fuchsia): There's no API to retrieve these on Fuchsia. The app name
13 // itself should be dynamic (i.e. not always "chrome") but other paths are
14 // correct as fixed paths like this. See https://crbug.com/726124.
scottmg1ab7aa82017-05-25 05:22:4915 switch (key) {
16 case FILE_EXE:
Scott Graham4bd2b07f2017-06-01 04:17:0417 *result = FilePath("/pkg/bin/chrome");
scottmg1ab7aa82017-05-25 05:22:4918 return true;
Scott Graham4bd2b07f2017-06-01 04:17:0419 case FILE_MODULE:
20 *result = FilePath("/pkg/lib/chrome");
21 return true;
22 case DIR_SOURCE_ROOT:
23 // This is only used for tests, so we return the binary location for now.
24 *result = FilePath("/system");
25 return true;
26 case DIR_CACHE:
27 *result = FilePath("/data");
28 return true;
scottmg1ab7aa82017-05-25 05:22:4929 }
30
31 return false;
32}
33
34} // namespace base