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

Unified Diff: chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc

Issue 118043003: Fix app_shell shutdown crash due to BrowserContextKeyedServices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup (shutdown_crash) Created 6 years, 11 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/chromeos/file_manager/external_filesystem_apitest.cc
diff --git a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
index f06038c2df7e7a9524c4af38f7d1cf1f60538969..cf5d75972a3a4ffcad4a75da0fd54d7c41872834 100644
--- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -291,6 +291,11 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
DriveFileSystemExtensionApiTest() : fake_drive_service_(NULL) {}
virtual ~DriveFileSystemExtensionApiTest() {}
+ virtual void TearDown() OVERRIDE {
+ FileSystemExtensionApiTestBase::TearDown();
+ drive::DriveIntegrationServiceFactory::SetFactoryForTest(NULL);
+ }
+
// FileSystemExtensionApiTestBase OVERRIDE.
virtual void InitTestFileSystem() OVERRIDE {
// Set up cache root to be used by DriveIntegrationService. This has to be
@@ -298,10 +303,11 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
// initialized by EventRouter.
ASSERT_TRUE(test_cache_root_.CreateUniqueTempDir());
+ create_drive_integration_service_ = base::Bind(
+ &DriveFileSystemExtensionApiTest::CreateDriveIntegrationService,
+ base::Unretained(this));
drive::DriveIntegrationServiceFactory::SetFactoryForTest(
- base::Bind(
- &DriveFileSystemExtensionApiTest::CreateDriveIntegrationService,
- base::Unretained(this)));
+ &create_drive_integration_service_);
}
// FileSystemExtensionApiTestBase OVERRIDE.
@@ -326,6 +332,8 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
base::ScopedTempDir test_cache_root_;
drive::FakeDriveService* fake_drive_service_;
+ drive::DriveIntegrationServiceFactory::FactoryCallback
+ create_drive_integration_service_;
};
//

Powered by Google App Engine
This is Rietveld 408576698