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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 private: 66 private:
67 // Start new request. 67 // Start new request.
68 void StartRequest(); 68 void StartRequest();
69 69
70 // Schedules retry. 70 // Schedules retry.
71 void Retry(); 71 void Retry();
72 72
73 // Called on UI thread. 73 // Called on UI thread.
74 void OnWallpaperDirectoryCreated(scoped_ptr<bool> success); 74 void OnWallpaperDirectoryCreated(std::unique_ptr<bool> success);
75 75
76 // Called on UI thread. 76 // Called on UI thread.
77 void OnTemporaryFileRenamed(scoped_ptr<bool> success); 77 void OnTemporaryFileRenamed(std::unique_ptr<bool> success);
78 78
79 // This is used to initialize net::URLFetcher object. 79 // This is used to initialize net::URLFetcher object.
80 scoped_refptr<net::URLRequestContextGetter> url_context_getter_; 80 scoped_refptr<net::URLRequestContextGetter> url_context_getter_;
81 81
82 // This fetcher is used to download wallpaper file. 82 // This fetcher is used to download wallpaper file.
83 scoped_ptr<net::URLFetcher> url_fetcher_; 83 std::unique_ptr<net::URLFetcher> url_fetcher_;
84 84
85 // The wallpaper URL to fetch. 85 // The wallpaper URL to fetch.
86 const GURL wallpaper_url_; 86 const GURL wallpaper_url_;
87 87
88 // Wallpaper directory (to be created). 88 // Wallpaper directory (to be created).
89 const base::FilePath wallpaper_dir_; 89 const base::FilePath wallpaper_dir_;
90 90
91 // Full path to local file to save downloaded wallpaper. 91 // Full path to local file to save downloaded wallpaper.
92 const base::FilePath wallpaper_downloaded_file_; 92 const base::FilePath wallpaper_downloaded_file_;
93 93
(...skipping 17 matching lines...) Expand all
111 base::Callback<void(bool success, const GURL&)> on_wallpaper_fetch_completed_; 111 base::Callback<void(bool success, const GURL&)> on_wallpaper_fetch_completed_;
112 112
113 base::WeakPtrFactory<CustomizationWallpaperDownloader> weak_factory_; 113 base::WeakPtrFactory<CustomizationWallpaperDownloader> weak_factory_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(CustomizationWallpaperDownloader); 115 DISALLOW_COPY_AND_ASSIGN(CustomizationWallpaperDownloader);
116 }; 116 };
117 117
118 } // namespace chromeos 118 } // namespace chromeos
119 119
120 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOA DER_H_ 120 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_CUSTOMIZATION_WALLPAPER_DOWNLOA DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698