| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  197       if (!base::android::GetCacheDirectory(&cur)) |  197       if (!base::android::GetCacheDirectory(&cur)) | 
|  198         return false; |  198         return false; | 
|  199 #else |  199 #else | 
|  200       // The crash reports are always stored relative to the default user data |  200       // The crash reports are always stored relative to the default user data | 
|  201       // directory.  This avoids the problem of having to re-initialize the |  201       // directory.  This avoids the problem of having to re-initialize the | 
|  202       // exception handler after parsing command line options, which may |  202       // exception handler after parsing command line options, which may | 
|  203       // override the location of the app's profile directory. |  203       // override the location of the app's profile directory. | 
|  204       if (!GetDefaultUserDataDirectory(&cur)) |  204       if (!GetDefaultUserDataDirectory(&cur)) | 
|  205         return false; |  205         return false; | 
|  206 #endif |  206 #endif | 
 |  207 #if defined(OS_MACOSX) | 
 |  208       cur = cur.Append(FILE_PATH_LITERAL("Crashpad")); | 
 |  209 #else | 
|  207       cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); |  210       cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); | 
 |  211 #endif | 
|  208       create_dir = true; |  212       create_dir = true; | 
|  209       break; |  213       break; | 
|  210 #if defined(OS_WIN) |  214 #if defined(OS_WIN) | 
|  211     case chrome::DIR_WATCHER_DATA: |  215     case chrome::DIR_WATCHER_DATA: | 
|  212       // The watcher data is always stored relative to the default user data |  216       // The watcher data is always stored relative to the default user data | 
|  213       // directory.  This allows the watcher to be initialized before |  217       // directory.  This allows the watcher to be initialized before | 
|  214       // command-line options have been parsed. |  218       // command-line options have been parsed. | 
|  215       if (!GetDefaultUserDataDirectory(&cur)) |  219       if (!GetDefaultUserDataDirectory(&cur)) | 
|  216         return false; |  220         return false; | 
|  217       cur = cur.Append(FILE_PATH_LITERAL("Diagnostics")); |  221       cur = cur.Append(FILE_PATH_LITERAL("Diagnostics")); | 
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  582  |  586  | 
|  583 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |  587 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 
|  584   g_invalid_specified_user_data_dir.Get() = user_data_dir; |  588   g_invalid_specified_user_data_dir.Get() = user_data_dir; | 
|  585 } |  589 } | 
|  586  |  590  | 
|  587 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |  591 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 
|  588   return g_invalid_specified_user_data_dir.Get(); |  592   return g_invalid_specified_user_data_dir.Get(); | 
|  589 } |  593 } | 
|  590  |  594  | 
|  591 }  // namespace chrome |  595 }  // namespace chrome | 
| OLD | NEW |