fuchsia: add base_paths_fuchsia.cc
I was going to use base_paths_posix.cc originally but it's already a big chain
of #ifdefs, and there's no XDG on Fuchsia, so it didn't seem that helpful.
BUG=706592,726124
Review-Url: https://codereview.chromium.org/2907473002
Cr-Commit-Position: refs/heads/master@{#474563}
diff --git a/base/base_paths_fuchsia.cc b/base/base_paths_fuchsia.cc
new file mode 100644
index 0000000..6b11bf3
--- /dev/null
+++ b/base/base_paths_fuchsia.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/base_paths.h"
+
+#include "base/files/file_path.h"
+
+namespace base {
+
+bool PathProviderFuchsia(int key, FilePath* result) {
+ switch (key) {
+ case FILE_EXE:
+ case FILE_MODULE: {
+ // TODO(fuchsia): There's no API to retrieve this on Fuchsia currently.
+ // See https://crbug.com/726124.
+ *result = FilePath("/system/chrome");
+ return true;
+ }
+ }
+
+ return false;
+}
+
+} // namespace base