Chromium Code Reviews| 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/file_util.h" | 7 #include "base/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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 #endif | 570 #endif |
| 571 #endif // !defined(OS_MACOSX) | 571 #endif // !defined(OS_MACOSX) |
| 572 break; | 572 break; |
| 573 | 573 |
| 574 case chrome::DIR_USER_NATIVE_MESSAGING: | 574 case chrome::DIR_USER_NATIVE_MESSAGING: |
| 575 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 575 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 576 return false; | 576 return false; |
| 577 cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); | 577 cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); |
| 578 break; | 578 break; |
| 579 #endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 579 #endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| 580 case chrome::DIR_GLOBAL_GCM_STORE: | |
| 581 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | |
| 582 return false; | |
| 583 cur = cur.Append("gcm_store"); | |
|
jianli
2014/06/02 22:34:40
Can we use kGCMStoreDirname that is defined in chr
bartfab (slow)
2014/06/03 13:36:49
Done.
| |
| 584 break; | |
| 580 | 585 |
| 581 default: | 586 default: |
| 582 return false; | 587 return false; |
| 583 } | 588 } |
| 584 | 589 |
| 585 // TODO(bauerb): http://crbug.com/259796 | 590 // TODO(bauerb): http://crbug.com/259796 |
| 586 base::ThreadRestrictions::ScopedAllowIO allow_io; | 591 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 587 if (create_dir && !base::PathExists(cur) && | 592 if (create_dir && !base::PathExists(cur) && |
| 588 !base::CreateDirectory(cur)) | 593 !base::CreateDirectory(cur)) |
| 589 return false; | 594 return false; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 600 | 605 |
| 601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 606 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 602 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 607 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 603 } | 608 } |
| 604 | 609 |
| 605 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 610 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 606 return g_invalid_specified_user_data_dir.Get(); | 611 return g_invalid_specified_user_data_dir.Get(); |
| 607 } | 612 } |
| 608 | 613 |
| 609 } // namespace chrome | 614 } // namespace chrome |
| OLD | NEW |