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 #ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 // Remove instance of ServicesCustomizationDocument for tests. | 188 // Remove instance of ServicesCustomizationDocument for tests. |
189 static void ShutdownForTesting(); | 189 static void ShutdownForTesting(); |
190 | 190 |
191 // These methods are also called by WallpaperManager to get "global default" | 191 // These methods are also called by WallpaperManager to get "global default" |
192 // customized wallpaper path (and to init default wallpaper path from it) | 192 // customized wallpaper path (and to init default wallpaper path from it) |
193 // before first wallpaper is shown. | 193 // before first wallpaper is shown. |
194 static base::FilePath GetCustomizedWallpaperCacheDir(); | 194 static base::FilePath GetCustomizedWallpaperCacheDir(); |
195 static base::FilePath GetCustomizedWallpaperDownloadedFileName(); | 195 static base::FilePath GetCustomizedWallpaperDownloadedFileName(); |
196 | 196 |
| 197 CustomizationWallpaperDownloader* wallpaper_downloader_for_testing() { |
| 198 return wallpaper_downloader_.get(); |
| 199 } |
| 200 |
197 private: | 201 private: |
198 friend struct DefaultSingletonTraits<ServicesCustomizationDocument>; | 202 friend struct DefaultSingletonTraits<ServicesCustomizationDocument>; |
| 203 FRIEND_TEST_ALL_PREFIXES(CustomizationWallpaperDownloaderBrowserTest, |
| 204 OEMWallpaperIsPresent); |
| 205 FRIEND_TEST_ALL_PREFIXES(CustomizationWallpaperDownloaderBrowserTest, |
| 206 OEMWallpaperRetryFetch); |
199 | 207 |
200 typedef std::vector<base::WeakPtr<ServicesCustomizationExternalLoader> > | 208 typedef std::vector<base::WeakPtr<ServicesCustomizationExternalLoader> > |
201 ExternalLoaders; | 209 ExternalLoaders; |
202 | 210 |
203 // Guard for a single application task (wallpaper downloading, for example). | 211 // Guard for a single application task (wallpaper downloading, for example). |
204 class ApplyingTask; | 212 class ApplyingTask; |
205 | 213 |
206 // C-tor for singleton construction. | 214 // C-tor for singleton construction. |
207 ServicesCustomizationDocument(); | 215 ServicesCustomizationDocument(); |
208 | 216 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 326 |
319 // Weak factory for callbacks. | 327 // Weak factory for callbacks. |
320 base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_; | 328 base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_; |
321 | 329 |
322 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); | 330 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); |
323 }; | 331 }; |
324 | 332 |
325 } // namespace chromeos | 333 } // namespace chromeos |
326 | 334 |
327 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 335 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
OLD | NEW |