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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2802973003: Remove ScopedVector from chrome/ (Closed)
Patch Set: Created 3 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/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index 3dcf0acfca4bf2f5e62e24014233a9bc028907ae..34fa8686cb9814cf44a1919150b89370be33a11a 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -221,16 +221,16 @@ void CreateResourceUsageReporter(
ChromeContentUtilityClient::ChromeContentUtilityClient()
: utility_process_running_elevated_(false) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
- handlers_.push_back(new extensions::ExtensionsHandler());
+ handlers_.push_back(base::MakeUnique<extensions::ExtensionsHandler>());
#endif
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
(BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
- handlers_.push_back(new printing::PrintingHandler());
+ handlers_.push_back(base::MakeUnique<printing::PrintingHandler>());
#endif
#if defined(OS_WIN)
- handlers_.push_back(new IPCShellHandler());
+ handlers_.push_back(base::MakeUnique<IPCShellHandler>());
#endif
}
@@ -251,7 +251,7 @@ bool ChromeContentUtilityClient::OnMessageReceived(
if (utility_process_running_elevated_)
return false;
- for (auto* handler : handlers_) {
+ for (const auto& handler : handlers_) {
if (handler->OnMessageReceived(message))
return true;
}

Powered by Google App Engine
This is Rietveld 408576698