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

Unified Diff: chrome/browser/autocomplete/history_url_provider_unittest.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 years, 6 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/autocomplete/history_url_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index d111f25bae8ba4349d553f1364bbc083104583d8..a5bd316dbc0e05520f8351c69644cd57037a2cbc 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
@@ -170,15 +171,15 @@ class HistoryURLProviderTest : public testing::Test,
void OnProviderUpdate(bool updated_matches) override;
protected:
- static KeyedService* CreateTemplateURLService(
+ static scoped_ptr<KeyedService> CreateTemplateURLService(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
- return new TemplateURLService(
+ return make_scoped_ptr(new TemplateURLService(
profile->GetPrefs(), make_scoped_ptr(new SearchTermsData), NULL,
scoped_ptr<TemplateURLServiceClient>(new ChromeTemplateURLServiceClient(
HistoryServiceFactory::GetForProfile(
profile, ServiceAccessType::EXPLICIT_ACCESS))),
- NULL, NULL, base::Closure());
+ NULL, NULL, base::Closure()));
}
// testing::Test

Powered by Google App Engine
This is Rietveld 408576698