Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| 11 namespace chromecast { | |
| 12 | |
| 13 bool PathProvider(int key, base::FilePath* result) { | |
| 14 switch (key) { | |
| 15 case DIR_CAST_HOME: { | |
| 16 base::FilePath home = base::GetHomeDir(); | |
| 17 #if defined(__arm__) | |
|
Ryan Sleevi
2014/07/01 21:13:55
Seems strange to use this directly, when we have b
lcwu1
2014/07/02 23:30:33
Changed to use ARCH_CPU_ARMEL defined in build/bui
| |
| 18 // When running on the actual device, our data directory is | |
| 19 // $HOME for the chrome user. | |
|
Ryan Sleevi
2014/07/01 21:13:55
This comment suggests a layering violation (commen
lcwu1
2014/07/02 23:30:32
This comment is really confusing, isn't it? What w
| |
| 20 *result = home; | |
| 21 #else | |
| 22 // When running a development instance as a regular user, use | |
| 23 // a data directory under $HOME (similar to chrome). | |
| 24 *result = home.Append(".config/cast_shell"); | |
| 25 #endif | |
| 26 return true; | |
| 27 } | |
| 28 } | |
| 29 return false; | |
| 30 } | |
| 31 | |
| 32 void RegisterPathProvider() { | |
| 33 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | |
| 34 } | |
| 35 | |
| 36 } // namespace chromecast | |
| OLD | NEW |