OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // For example: out/{Debug|Release}/net_unittest | 92 // For example: out/{Debug|Release}/net_unittest |
93 if (PathService::Get(base::DIR_EXE, &path)) { | 93 if (PathService::Get(base::DIR_EXE, &path)) { |
94 *result = path.DirName().DirName(); | 94 *result = path.DirName().DirName(); |
95 return true; | 95 return true; |
96 } | 96 } |
97 | 97 |
98 DLOG(ERROR) << "Couldn't find your source root. " | 98 DLOG(ERROR) << "Couldn't find your source root. " |
99 << "Try running from your chromium/src directory."; | 99 << "Try running from your chromium/src directory."; |
100 return false; | 100 return false; |
101 } | 101 } |
102 case base::DIR_CACHE: | 102 case base::DIR_CACHE: { |
103 scoped_ptr<base::Environment> env(base::Environment::Create()); | 103 scoped_ptr<base::Environment> env(base::Environment::Create()); |
104 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", | 104 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", |
105 ".cache")); | 105 ".cache")); |
106 *result = cache_dir; | 106 *result = cache_dir; |
107 return true; | 107 return true; |
| 108 } |
| 109 case base::DIR_MEDIA_LIBS: { |
| 110 if (!PathService::Get(base::DIR_MODULE, result)) |
| 111 return false; |
| 112 return true; |
| 113 } |
108 } | 114 } |
109 return false; | 115 return false; |
110 } | 116 } |
111 | 117 |
112 } // namespace base | 118 } // namespace base |
OLD | NEW |