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

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: Fix FileSystem tests (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..ff30b98bb9b348573f74dee01a502e2ca5cf90c2 100644
--- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -299,9 +299,8 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
ASSERT_TRUE(test_cache_root_.CreateUniqueTempDir());
tbarzic 2014/01/09 01:58:25 you could also (optionally) do something like: th
James Cook 2014/01/09 17:32:19 Nice idea. Done.
drive::DriveIntegrationServiceFactory::SetFactoryForTest(
- base::Bind(
- &DriveFileSystemExtensionApiTest::CreateDriveIntegrationService,
- base::Unretained(this)));
+ &DriveFileSystemExtensionApiTest::OnCreateDriveIntegrationService,
+ this);
}
// FileSystemExtensionApiTestBase OVERRIDE.
@@ -310,6 +309,13 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
}
protected:
+ static drive::DriveIntegrationService* OnCreateDriveIntegrationService(
+ Profile* profile, void* data) {
+ DriveFileSystemExtensionApiTest* self =
+ static_cast<DriveFileSystemExtensionApiTest*>(data);
+ return self->CreateDriveIntegrationService(profile);
+ }
+
// DriveIntegrationService factory function for this test.
drive::DriveIntegrationService* CreateDriveIntegrationService(
Profile* profile) {

Powered by Google App Engine
This is Rietveld 408576698