| 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.h" | 5 #include "chrome/common/chrome_paths.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 if (!base::android::GetCacheDirectory(&cur)) | 203 if (!base::android::GetCacheDirectory(&cur)) |
| 204 return false; | 204 return false; |
| 205 #else | 205 #else |
| 206 // The crash reports are always stored relative to the default user data | 206 // The crash reports are always stored relative to the default user data |
| 207 // directory. This avoids the problem of having to re-initialize the | 207 // directory. This avoids the problem of having to re-initialize the |
| 208 // exception handler after parsing command line options, which may | 208 // exception handler after parsing command line options, which may |
| 209 // override the location of the app's profile directory. | 209 // override the location of the app's profile directory. |
| 210 if (!GetDefaultUserDataDirectory(&cur)) | 210 if (!GetDefaultUserDataDirectory(&cur)) |
| 211 return false; | 211 return false; |
| 212 #endif | 212 #endif |
| 213 #if defined(OS_MACOSX) | 213 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 214 cur = cur.Append(FILE_PATH_LITERAL("Crashpad")); | 214 cur = cur.Append(FILE_PATH_LITERAL("Crashpad")); |
| 215 #else | 215 #else |
| 216 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); | 216 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); |
| 217 #endif | 217 #endif |
| 218 create_dir = true; | 218 create_dir = true; |
| 219 break; | 219 break; |
| 220 #if defined(OS_WIN) | 220 #if defined(OS_WIN) |
| 221 case chrome::DIR_WATCHER_DATA: | 221 case chrome::DIR_WATCHER_DATA: |
| 222 // The watcher data is always stored relative to the default user data | 222 // The watcher data is always stored relative to the default user data |
| 223 // directory. This allows the watcher to be initialized before | 223 // directory. This allows the watcher to be initialized before |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 610 |
| 611 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 611 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 612 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 612 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 613 } | 613 } |
| 614 | 614 |
| 615 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 615 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 616 return g_invalid_specified_user_data_dir.Get(); | 616 return g_invalid_specified_user_data_dir.Get(); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace chrome | 619 } // namespace chrome |
| OLD | NEW |