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

Unified Diff: chrome/browser/download/download_shelf_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/download/download_shelf_unittest.cc
diff --git a/chrome/browser/download/download_shelf_unittest.cc b/chrome/browser/download/download_shelf_unittest.cc
index 631153635c01180ed18341f31bc776ebce4533e4..257cf2c9bfaaf9d209f83274fdc45778ff75ba90 100644
--- a/chrome/browser/download/download_shelf_unittest.cc
+++ b/chrome/browser/download/download_shelf_unittest.cc
@@ -28,10 +28,6 @@ using content::DownloadItem;
namespace {
-KeyedService* CreateDownloadService(content::BrowserContext* context) {
- return new DownloadService(Profile::FromBrowserContext(context));
-}
-
class DownloadShelfTest : public testing::Test {
public:
DownloadShelfTest();
@@ -49,13 +45,9 @@ class DownloadShelfTest : public testing::Test {
Profile* profile() { return profile_.get(); }
void SetUp() override {
- DownloadServiceFactory::GetInstance()->SetTestingFactory(
- profile(), &CreateDownloadService);
}
void TearDown() override {
- DownloadServiceFactory::GetInstance()->SetTestingFactory(
- profile(), NULL);
}
private:

Powered by Google App Engine
This is Rietveld 408576698