OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 "chrome/browser/user_data_dir_extractor.h" | |
6 | |
7 #include "base/files/file_path.h" | |
8 #include "base/logging.h" | |
9 #include "base/path_service.h" | |
10 #include "chrome/common/chrome_paths.h" | |
11 | |
12 namespace chrome { | |
13 | |
14 #if !defined(OS_WIN) | |
sky
2013/03/25 21:43:20
Nuke this and instead update the gyp dependencies
hshi1
2013/03/25 22:10:14
Done.
| |
15 | |
16 base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) { | |
17 base::FilePath user_data_dir; | |
18 | |
19 // Getting the user data dir can fail if the directory isn't creatable, for | |
20 // example: on Windows we bring up a dialog prompting the user to pick a | |
21 // different directory. However, ProcessSingleton needs a real user_data_dir | |
22 // on Mac/Linux, so it's better to fail here than fail mysteriously elsewhere. | |
23 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) | |
24 << "Must be able to get user data directory!"; | |
25 return user_data_dir; | |
26 } | |
27 | |
28 #endif // !defined(OS_WIN) | |
29 | |
30 } // namespace chrome | |
OLD | NEW |