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

Unified Diff: chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
diff --git a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
index 667a1901ef5bb3594e3e86574fe29929decae11d..2a63357aecf5a05165c5ef69c69781b4b40dc8eb 100644
--- a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
+++ b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
@@ -29,11 +29,11 @@ namespace {
const char kTestRequestParam[] = "extension-updater-test-request";
} // namespace
-scoped_ptr<ExtensionDownloader>
+std::unique_ptr<ExtensionDownloader>
ChromeExtensionDownloaderFactory::CreateForRequestContext(
net::URLRequestContextGetter* request_context,
ExtensionDownloaderDelegate* delegate) {
- scoped_ptr<ExtensionDownloader> downloader(
+ std::unique_ptr<ExtensionDownloader> downloader(
new ExtensionDownloader(delegate, request_context));
#if defined(GOOGLE_CHROME_BUILD)
std::string brand;
@@ -55,15 +55,16 @@ ChromeExtensionDownloaderFactory::CreateForRequestContext(
return downloader;
}
-scoped_ptr<ExtensionDownloader>
+std::unique_ptr<ExtensionDownloader>
ChromeExtensionDownloaderFactory::CreateForProfile(
Profile* profile,
ExtensionDownloaderDelegate* delegate) {
- scoped_ptr<IdentityProvider> identity_provider(new ProfileIdentityProvider(
- SigninManagerFactory::GetForProfile(profile),
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
- LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile)));
- scoped_ptr<ExtensionDownloader> downloader =
+ std::unique_ptr<IdentityProvider> identity_provider(
+ new ProfileIdentityProvider(
+ SigninManagerFactory::GetForProfile(profile),
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
+ LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile)));
+ std::unique_ptr<ExtensionDownloader> downloader =
CreateForRequestContext(profile->GetRequestContext(), delegate);
downloader->SetWebstoreIdentityProvider(std::move(identity_provider));
return downloader;

Powered by Google App Engine
This is Rietveld 408576698