OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/chrome_paths.h" | 5 #include "ios/chrome/browser/chrome_paths.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
13 #include "components/gcm_driver/gcm_driver_constants.h" | 13 #include "components/gcm_driver/gcm_driver_constants.h" |
14 #include "ios/chrome/browser/chrome_paths_internal.h" | 14 #include "ios/chrome/browser/chrome_paths_internal.h" |
15 | 15 |
| 16 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 17 #error "This file requires ARC support." |
| 18 #endif |
| 19 |
16 namespace ios { | 20 namespace ios { |
17 namespace { | 21 namespace { |
18 | 22 |
19 #if defined(GOOGLE_CHROME_BUILD) | 23 #if defined(GOOGLE_CHROME_BUILD) |
20 const base::FilePath::CharType kProductDirName[] = | 24 const base::FilePath::CharType kProductDirName[] = |
21 FILE_PATH_LITERAL("Google/Chrome"); | 25 FILE_PATH_LITERAL("Google/Chrome"); |
22 #else | 26 #else |
23 const base::FilePath::CharType kProductDirName[] = | 27 const base::FilePath::CharType kProductDirName[] = |
24 FILE_PATH_LITERAL("Chromium"); | 28 FILE_PATH_LITERAL("Chromium"); |
25 #endif | 29 #endif |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 base::FilePath cache_dir; | 115 base::FilePath cache_dir; |
112 if (!PathService::Get(base::DIR_CACHE, &cache_dir)) | 116 if (!PathService::Get(base::DIR_CACHE, &cache_dir)) |
113 return; | 117 return; |
114 if (!app_data_dir.AppendRelativePath(browser_state_dir, &cache_dir)) | 118 if (!app_data_dir.AppendRelativePath(browser_state_dir, &cache_dir)) |
115 return; | 119 return; |
116 | 120 |
117 *result = cache_dir; | 121 *result = cache_dir; |
118 } | 122 } |
119 | 123 |
120 } // namespace ios | 124 } // namespace ios |
OLD | NEW |