Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: chrome/browser/chromeos/customization/customization_wallpaper_downloader.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CUSTOMIZATION_WALLPAPER_DOWNLOADER _H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOADER _H_
6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOADER _H_ 6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOADER _H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Wallpaper directory (to be created). 86 // Wallpaper directory (to be created).
87 const base::FilePath wallpaper_dir_; 87 const base::FilePath wallpaper_dir_;
88 88
89 // Full path to local file to save downloaded wallpaper. 89 // Full path to local file to save downloaded wallpaper.
90 const base::FilePath wallpaper_downloaded_file_; 90 const base::FilePath wallpaper_downloaded_file_;
91 91
92 // Full path to temporary file to fetch downloaded wallpper. 92 // Full path to temporary file to fetch downloaded wallpper.
93 const base::FilePath wallpaper_temporary_file_; 93 const base::FilePath wallpaper_temporary_file_;
94 94
95 // Pending retry. 95 // Pending retry.
96 base::OneShotTimer<CustomizationWallpaperDownloader> request_scheduled_; 96 base::OneShotTimer request_scheduled_;
97 97
98 // Number of download retries (first attempt is not counted as retry). 98 // Number of download retries (first attempt is not counted as retry).
99 size_t retries_; 99 size_t retries_;
100 100
101 // Sleep between retry requests (increasing, see Retry() method for details). 101 // Sleep between retry requests (increasing, see Retry() method for details).
102 // Non-constant value for tests. 102 // Non-constant value for tests.
103 base::TimeDelta retry_delay_; 103 base::TimeDelta retry_delay_;
104 104
105 // Retry delay of the last attempt. For testing only. 105 // Retry delay of the last attempt. For testing only.
106 base::TimeDelta retry_current_delay_; 106 base::TimeDelta retry_current_delay_;
107 107
108 // Callback supplied by caller. 108 // Callback supplied by caller.
109 base::Callback<void(bool success, const GURL&)> on_wallpaper_fetch_completed_; 109 base::Callback<void(bool success, const GURL&)> on_wallpaper_fetch_completed_;
110 110
111 base::WeakPtrFactory<CustomizationWallpaperDownloader> weak_factory_; 111 base::WeakPtrFactory<CustomizationWallpaperDownloader> weak_factory_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(CustomizationWallpaperDownloader); 113 DISALLOW_COPY_AND_ASSIGN(CustomizationWallpaperDownloader);
114 }; 114 };
115 115
116 } // namespace chromeos 116 } // namespace chromeos
117 117
118 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOA DER_H_ 118 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOA DER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/camera_presence_notifier.h ('k') | chrome/browser/chromeos/extensions/install_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698