| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 case chrome::DIR_RESOURCES: | 252 case chrome::DIR_RESOURCES: |
| 253 #if defined(OS_MACOSX) | 253 #if defined(OS_MACOSX) |
| 254 cur = base::mac::FrameworkBundlePath(); | 254 cur = base::mac::FrameworkBundlePath(); |
| 255 cur = cur.Append(FILE_PATH_LITERAL("Resources")); | 255 cur = cur.Append(FILE_PATH_LITERAL("Resources")); |
| 256 #else | 256 #else |
| 257 if (!PathService::Get(chrome::DIR_APP, &cur)) | 257 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 258 return false; | 258 return false; |
| 259 cur = cur.Append(FILE_PATH_LITERAL("resources")); | 259 cur = cur.Append(FILE_PATH_LITERAL("resources")); |
| 260 #endif | 260 #endif |
| 261 break; | 261 break; |
| 262 case chrome::DIR_INSPECTOR: | 262 case chrome::DIR_INSPECTOR_DEBUG: |
| 263 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 263 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 264 return false; | 264 return false; |
| 265 cur = cur.Append(FILE_PATH_LITERAL("inspector")); | 265 cur = cur.Append(FILE_PATH_LITERAL("inspector")); |
| 266 cur = cur.Append(FILE_PATH_LITERAL("debug")); |
| 266 break; | 267 break; |
| 267 case chrome::DIR_APP_DICTIONARIES: | 268 case chrome::DIR_APP_DICTIONARIES: |
| 268 #if defined(OS_POSIX) | 269 #if defined(OS_POSIX) |
| 269 // We can't write into the EXE dir on Linux, so keep dictionaries | 270 // We can't write into the EXE dir on Linux, so keep dictionaries |
| 270 // alongside the safe browsing database in the user data dir. | 271 // alongside the safe browsing database in the user data dir. |
| 271 // And we don't want to write into the bundle on the Mac, so push | 272 // And we don't want to write into the bundle on the Mac, so push |
| 272 // it to the user data dir there also. | 273 // it to the user data dir there also. |
| 273 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 274 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 274 return false; | 275 return false; |
| 275 #else | 276 #else |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 606 |
| 606 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 607 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 607 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 608 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 608 } | 609 } |
| 609 | 610 |
| 610 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 611 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 611 return g_invalid_specified_user_data_dir.Get(); | 612 return g_invalid_specified_user_data_dir.Get(); |
| 612 } | 613 } |
| 613 | 614 |
| 614 } // namespace chrome | 615 } // namespace chrome |
| OLD | NEW |