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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Picasa are installed. | 191 // Picasa are installed. |
192 app_data_override_.reset(new base::ScopedPathOverride( | 192 app_data_override_.reset(new base::ScopedPathOverride( |
193 base::DIR_APP_DATA, GetFakeAppDataPath())); | 193 base::DIR_APP_DATA, GetFakeAppDataPath())); |
194 #endif // OS_WIN || OS_MACOSX | 194 #endif // OS_WIN || OS_MACOSX |
195 | 195 |
196 #if defined(OS_WIN) | 196 #if defined(OS_WIN) |
197 // Picasa on Windows is by default in the DIR_LOCAL_APP_DATA directory. | 197 // Picasa on Windows is by default in the DIR_LOCAL_APP_DATA directory. |
198 local_app_data_override_.reset(new base::ScopedPathOverride( | 198 local_app_data_override_.reset(new base::ScopedPathOverride( |
199 base::DIR_LOCAL_APP_DATA, GetFakeLocalAppDataPath())); | 199 base::DIR_LOCAL_APP_DATA, GetFakeLocalAppDataPath())); |
200 // Picasa also looks in the registry for an alternate path. | 200 // Picasa also looks in the registry for an alternate path. |
201 registry_override_.OverrideRegistry(HKEY_CURRENT_USER, L"hkcu_picasa"); | 201 registry_override_.OverrideRegistry(HKEY_CURRENT_USER); |
202 #endif // OS_WIN | 202 #endif // OS_WIN |
203 | 203 |
204 #if defined(OS_MACOSX) | 204 #if defined(OS_MACOSX) |
205 mac_preferences_.reset(new MockPreferences); | 205 mac_preferences_.reset(new MockPreferences); |
206 | 206 |
207 // iTunes override. | 207 // iTunes override. |
208 base::FilePath itunes_xml = | 208 base::FilePath itunes_xml = |
209 GetFakeITunesRootPath().AppendASCII("iTunes Library.xml"); | 209 GetFakeITunesRootPath().AppendASCII("iTunes Library.xml"); |
210 mac_preferences_->AddTestItem( | 210 mac_preferences_->AddTestItem( |
211 base::mac::NSToCFCast(iapps::kITunesRecentDatabasePathsKey), | 211 base::mac::NSToCFCast(iapps::kITunesRecentDatabasePathsKey), |
(...skipping 18 matching lines...) Expand all Loading... |
230 | 230 |
231 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { | 231 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { |
232 #if defined(OS_WIN) | 232 #if defined(OS_WIN) |
233 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); | 233 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); |
234 #elif defined(OS_POSIX) | 234 #elif defined(OS_POSIX) |
235 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); | 235 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); |
236 #else | 236 #else |
237 NOTREACHED(); | 237 NOTREACHED(); |
238 #endif | 238 #endif |
239 } | 239 } |
OLD | NEW |