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

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: Add an additional function in gl_surface_cast.cc Created 6 years, 8 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 (c) 2014 Google Inc. All Rights Reserved.
jam 2014/04/04 01:01:24 btw in this and other files, no "(c)"
lcwu1 2014/04/22 00:59:40 Done.
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__)
18 // When running on the actual device, our data directory is
19 // $HOME for the chrome user.
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 // This cannot be done as a static initializer sadly since Visual Studio will
33 // eliminate this object file if there is no direct entry point into it.
jam 2014/04/04 01:01:24 no need to copy this comment
lcwu1 2014/04/22 00:59:40 Done.
34 void RegisterPathProvider() {
35 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
36 }
37
38 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698