Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Side by Side Diff: chromecast/common/cast_paths.cc

Issue 223143003: Initial checkin of chromecast content embedder (cast_shell) and related build scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address/incorporate review comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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 "chromecast/common/cast_paths.h"
6
7 #include "base/file_util.h"
8 #include "base/files/file_path.h"
9 #include "base/path_service.h"
10 #include "build/build_config.h"
11
12 namespace chromecast {
13
14 bool PathProvider(int key, base::FilePath* result) {
15 switch (key) {
16 case DIR_CAST_HOME: {
17 base::FilePath home = base::GetHomeDir();
18 #if defined(ARCH_CPU_ARMEL)
19 // When running on the actual device, $HOME is set to the user's
20 // directory under the data partition.
21 *result = home;
22 #else
23 // When running a development instance as a regular user, use
24 // a data directory under $HOME (similar to Chrome).
25 *result = home.Append(".config/cast_shell");
26 #endif
27 return true;
28 }
29 }
30 return false;
31 }
32
33 void RegisterPathProvider() {
34 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
35 }
36
37 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698