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

Side by Side Diff: chrome/browser/extensions/updater/chrome_extension_downloader_factory.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9 9
10 class Profile; 10 class Profile;
11 11
12 namespace extensions { 12 namespace extensions {
13 class ExtensionDownloader; 13 class ExtensionDownloader;
14 class ExtensionDownloaderDelegate; 14 class ExtensionDownloaderDelegate;
15 } 15 }
16 16
17 namespace net { 17 namespace net {
18 class URLRequestContextGetter; 18 class URLRequestContextGetter;
19 } 19 }
20 20
21 // This provides a simple static interface for constructing an 21 // This provides a simple static interface for constructing an
22 // ExtensionDownloader suitable for use from within Chrome. 22 // ExtensionDownloader suitable for use from within Chrome.
23 class ChromeExtensionDownloaderFactory { 23 class ChromeExtensionDownloaderFactory {
24 public: 24 public:
25 // Creates a downloader with the given request context. No profile identity 25 // Creates a downloader with the given request context. No profile identity
26 // is associated with this downloader. 26 // is associated with this downloader.
27 static scoped_ptr<extensions::ExtensionDownloader> CreateForRequestContext( 27 static std::unique_ptr<extensions::ExtensionDownloader>
28 net::URLRequestContextGetter* request_context, 28 CreateForRequestContext(net::URLRequestContextGetter* request_context,
29 extensions::ExtensionDownloaderDelegate* delegate); 29 extensions::ExtensionDownloaderDelegate* delegate);
30 30
31 // Creates a downloader for a given Profile. This downloader will be able 31 // Creates a downloader for a given Profile. This downloader will be able
32 // to authenticate as the signed-in user in the event that it's asked to 32 // to authenticate as the signed-in user in the event that it's asked to
33 // fetch a protected download. 33 // fetch a protected download.
34 static scoped_ptr<extensions::ExtensionDownloader> CreateForProfile( 34 static std::unique_ptr<extensions::ExtensionDownloader> CreateForProfile(
35 Profile* profile, 35 Profile* profile,
36 extensions::ExtensionDownloaderDelegate* delegate); 36 extensions::ExtensionDownloaderDelegate* delegate);
37 }; 37 };
38 38
39 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY _H_ 39 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_CHROME_EXTENSION_DOWNLOADER_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698