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/browser/media_galleries/media_galleries_test_util.h" | 5 #include "chrome/browser/media_galleries/media_galleries_test_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Picasa are installed. | 186 // Picasa are installed. |
187 app_data_override_.reset(new base::ScopedPathOverride( | 187 app_data_override_.reset(new base::ScopedPathOverride( |
188 base::DIR_APP_DATA, GetFakeAppDataPath())); | 188 base::DIR_APP_DATA, GetFakeAppDataPath())); |
189 #endif // OS_WIN || OS_MACOSX | 189 #endif // OS_WIN || OS_MACOSX |
190 | 190 |
191 #if defined(OS_WIN) | 191 #if defined(OS_WIN) |
192 // Picasa on Windows is by default in the DIR_LOCAL_APP_DATA directory. | 192 // Picasa on Windows is by default in the DIR_LOCAL_APP_DATA directory. |
193 local_app_data_override_.reset(new base::ScopedPathOverride( | 193 local_app_data_override_.reset(new base::ScopedPathOverride( |
194 base::DIR_LOCAL_APP_DATA, GetFakeLocalAppDataPath())); | 194 base::DIR_LOCAL_APP_DATA, GetFakeLocalAppDataPath())); |
195 // Picasa also looks in the registry for an alternate path. | 195 // Picasa also looks in the registry for an alternate path. |
196 registry_override_.OverrideRegistry(HKEY_CURRENT_USER); | 196 ASSERT_NO_FATAL_FAILURE( |
| 197 registry_override_.OverrideRegistry(HKEY_CURRENT_USER)); |
197 #endif // OS_WIN | 198 #endif // OS_WIN |
198 | 199 |
199 #if defined(OS_MACOSX) | 200 #if defined(OS_MACOSX) |
200 mac_preferences_.reset(new MockPreferences); | 201 mac_preferences_.reset(new MockPreferences); |
201 | 202 |
202 // iTunes override. | 203 // iTunes override. |
203 base::FilePath itunes_xml = | 204 base::FilePath itunes_xml = |
204 GetFakeITunesRootPath().AppendASCII("iTunes Library.xml"); | 205 GetFakeITunesRootPath().AppendASCII("iTunes Library.xml"); |
205 mac_preferences_->AddTestItem( | 206 mac_preferences_->AddTestItem( |
206 base::mac::NSToCFCast(iapps::kITunesRecentDatabasePathsKey), | 207 base::mac::NSToCFCast(iapps::kITunesRecentDatabasePathsKey), |
(...skipping 10 matching lines...) Expand all Loading... |
217 | 218 |
218 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { | 219 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { |
219 #if defined(OS_WIN) | 220 #if defined(OS_WIN) |
220 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); | 221 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); |
221 #elif defined(OS_POSIX) | 222 #elif defined(OS_POSIX) |
222 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); | 223 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); |
223 #else | 224 #else |
224 NOTREACHED(); | 225 NOTREACHED(); |
225 #endif | 226 #endif |
226 } | 227 } |
OLD | NEW |