| 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/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 break; | 241 break; |
| 242 #if defined(OS_WIN) | 242 #if defined(OS_WIN) |
| 243 case chrome::DIR_WATCHER_DATA: | 243 case chrome::DIR_WATCHER_DATA: |
| 244 // The watcher data is always stored relative to the default user data | 244 // The watcher data is always stored relative to the default user data |
| 245 // directory. This allows the watcher to be initialized before | 245 // directory. This allows the watcher to be initialized before |
| 246 // command-line options have been parsed. | 246 // command-line options have been parsed. |
| 247 if (!GetDefaultUserDataDirectory(&cur)) | 247 if (!GetDefaultUserDataDirectory(&cur)) |
| 248 return false; | 248 return false; |
| 249 cur = cur.Append(FILE_PATH_LITERAL("Diagnostics")); | 249 cur = cur.Append(FILE_PATH_LITERAL("Diagnostics")); |
| 250 break; | 250 break; |
| 251 case chrome::DIR_ROAMING_USER_DATA: |
| 252 if (!GetDefaultRoamingUserDataDirectory(&cur)) { |
| 253 NOTREACHED(); |
| 254 return false; |
| 255 } |
| 256 create_dir = true; |
| 257 break; |
| 251 #endif | 258 #endif |
| 252 case chrome::DIR_RESOURCES: | 259 case chrome::DIR_RESOURCES: |
| 253 #if defined(OS_MACOSX) | 260 #if defined(OS_MACOSX) |
| 254 cur = base::mac::FrameworkBundlePath(); | 261 cur = base::mac::FrameworkBundlePath(); |
| 255 cur = cur.Append(FILE_PATH_LITERAL("Resources")); | 262 cur = cur.Append(FILE_PATH_LITERAL("Resources")); |
| 256 #else | 263 #else |
| 257 if (!PathService::Get(chrome::DIR_APP, &cur)) | 264 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 258 return false; | 265 return false; |
| 259 cur = cur.Append(FILE_PATH_LITERAL("resources")); | 266 cur = cur.Append(FILE_PATH_LITERAL("resources")); |
| 260 #endif | 267 #endif |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 607 |
| 601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 608 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 602 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 609 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 603 } | 610 } |
| 604 | 611 |
| 605 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 612 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 606 return g_invalid_specified_user_data_dir.Get(); | 613 return g_invalid_specified_user_data_dir.Get(); |
| 607 } | 614 } |
| 608 | 615 |
| 609 } // namespace chrome | 616 } // namespace chrome |
| OLD | NEW |