| 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 "chrome/common/chrome_paths_internal.h" | 5 #include "chrome/common/chrome_paths_internal.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "content/public/common/content_switches.h" | |
| 11 | 10 |
| 12 namespace chrome { | 11 namespace chrome { |
| 13 | 12 |
| 14 void GetUserCacheDirectory(const base::FilePath& profile_dir, | 13 void GetUserCacheDirectory(const base::FilePath& profile_dir, |
| 15 base::FilePath* result) { | 14 base::FilePath* result) { |
| 16 if (!PathService::Get(base::DIR_CACHE, result)) | 15 if (!PathService::Get(base::DIR_CACHE, result)) |
| 17 *result = profile_dir; | 16 *result = profile_dir; |
| 18 } | 17 } |
| 19 | 18 |
| 20 bool GetDefaultUserDataDirectory(base::FilePath* result) { | 19 bool GetDefaultUserDataDirectory(base::FilePath* result) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 return false; | 49 return false; |
| 51 } | 50 } |
| 52 | 51 |
| 53 bool ProcessNeedsProfileDir(const std::string& process_type) { | 52 bool ProcessNeedsProfileDir(const std::string& process_type) { |
| 54 // SELinux prohibits accessing the data directory from isolated services. Only | 53 // SELinux prohibits accessing the data directory from isolated services. Only |
| 55 // the browser (empty process type) should access the profile directory. | 54 // the browser (empty process type) should access the profile directory. |
| 56 return process_type.empty(); | 55 return process_type.empty(); |
| 57 } | 56 } |
| 58 | 57 |
| 59 } // namespace chrome | 58 } // namespace chrome |
| OLD | NEW |