Upload upstream chromium 71.0.3578.0
[platform/framework/web/chromium-efl.git] / base / base_paths_fuchsia.cc
1 // 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 <stdlib.h>
8
9 #include "base/base_paths_fuchsia.h"
10 #include "base/command_line.h"
11 #include "base/files/file_util.h"
12 #include "base/path_service.h"
13 #include "base/process/process.h"
14
15 namespace base {
16
17 bool PathProviderFuchsia(int key, FilePath* result) {
18   switch (key) {
19     case FILE_MODULE:
20       NOTIMPLEMENTED();
21       return false;
22     case FILE_EXE:
23       *result = CommandLine::ForCurrentProcess()->GetProgram();
24       return true;
25     case DIR_APP_DATA:
26     case DIR_CACHE:
27       *result = base::FilePath("/data");
28       return true;
29     case DIR_ASSETS:
30     case DIR_SOURCE_ROOT:
31       *result = base::FilePath("/pkg");
32       return true;
33   }
34   return false;
35 }
36
37 }  // namespace base