Index: chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc |
index 2b25c3269db1cd45b4b9df3983c86713e4021c91..22132394b9ea999679f90dd7a84a0fdc5a780b56 100644 |
--- a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc |
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc |
@@ -71,13 +71,6 @@ storage::FileSystemURL CreateFileSystemURL(const std::string& mount_point_name, |
base::FilePath::FromUTF8Unsafe(mount_point_name).Append(file_path)); |
} |
-// Creates a Service instance. Used to be able to destroy the service in |
-// TearDown(). |
-KeyedService* CreateService(content::BrowserContext* context) { |
- return new Service(Profile::FromBrowserContext(context), |
- extensions::ExtensionRegistry::Get(context)); |
-} |
- |
} // namespace |
class FileSystemProviderFileStreamReader : public testing::Test { |
@@ -92,7 +85,6 @@ class FileSystemProviderFileStreamReader : public testing::Test { |
ASSERT_TRUE(profile_manager_->SetUp()); |
profile_ = profile_manager_->CreateTestingProfile("testing-profile"); |
- ServiceFactory::GetInstance()->SetTestingFactory(profile_, &CreateService); |
Service* service = Service::Get(profile_); // Owned by its factory. |
service->SetFileSystemFactoryForTesting( |
base::Bind(&FakeProvidedFileSystem::Create)); |
@@ -120,12 +112,6 @@ class FileSystemProviderFileStreamReader : public testing::Test { |
ASSERT_TRUE(wrong_file_url_.is_valid()); |
} |
- void TearDown() override { |
- // Setting the testing factory to NULL will destroy the created service |
- // associated with the testing profile. |
- ServiceFactory::GetInstance()->SetTestingFactory(profile_, NULL); |
- } |
- |
content::TestBrowserThreadBundle thread_bundle_; |
base::ScopedTempDir data_dir_; |
scoped_ptr<TestingProfileManager> profile_manager_; |