| Index: chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc
|
| diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc
|
| index 54076117e011b70a56310e991137cc62a0c28295..8dc792038205c85398be9ebdd2625055f7eb2426 100644
|
| --- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc
|
| +++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_sync_unittest.cc
|
| @@ -24,7 +24,9 @@
|
| #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
|
| #include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
|
| #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
|
| +#include "chrome/test/base/testing_browser_process.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| +#include "chrome/test/base/testing_profile_manager.h"
|
| #include "content/public/test/test_browser_thread.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -41,6 +43,10 @@ using google_apis::ResourceEntry;
|
|
|
| namespace sync_file_system {
|
|
|
| +namespace {
|
| +const char kTestProfileName[] = "test-profile";
|
| +}
|
| +
|
| using drive_backend::APIUtil;
|
| using drive_backend::APIUtilInterface;
|
| using drive_backend::FakeDriveServiceHelper;
|
| @@ -48,7 +54,8 @@ using drive_backend::FakeDriveServiceHelper;
|
| class DriveFileSyncServiceSyncTest : public testing::Test {
|
| public:
|
| DriveFileSyncServiceSyncTest()
|
| - : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
|
| + : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
|
| + profile_manager_(TestingBrowserProcess::GetGlobal()) {}
|
|
|
| virtual ~DriveFileSyncServiceSyncTest() {
|
| }
|
| @@ -57,9 +64,13 @@ class DriveFileSyncServiceSyncTest : public testing::Test {
|
| // TODO(tzik): Set up TestExtensionSystem to support simulated relaunch.
|
| in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
|
|
|
| + ASSERT_TRUE(profile_manager_.SetUp());
|
| + TestingProfile* profile =
|
| + profile_manager_.CreateTestingProfile(kTestProfileName);
|
| +
|
| RegisterSyncableFileSystem();
|
| local_sync_service_ = LocalFileSyncService::CreateForTesting(
|
| - &profile_, in_memory_env_.get());
|
| + profile, in_memory_env_.get());
|
|
|
| fake_drive_service_ = new drive::FakeDriveService();
|
| fake_drive_service_->Initialize("test_user@gmail.com");
|
| @@ -91,7 +102,7 @@ class DriveFileSyncServiceSyncTest : public testing::Test {
|
| scoped_ptr<drive::DriveUploaderInterface>(drive_uploader_)));
|
|
|
| remote_sync_service_ = DriveFileSyncService::CreateForTesting(
|
| - &profile_,
|
| + profile,
|
| fake_drive_helper_->base_dir_path(),
|
| api_util.PassAs<APIUtilInterface>(),
|
| metadata_store.Pass());
|
| @@ -363,7 +374,7 @@ class DriveFileSyncServiceSyncTest : public testing::Test {
|
| content::TestBrowserThreadBundle thread_bundle_;
|
|
|
| scoped_ptr<leveldb::Env> in_memory_env_;
|
| - TestingProfile profile_;
|
| + TestingProfileManager profile_manager_;
|
|
|
| drive::FakeDriveService* fake_drive_service_;
|
| drive::DriveUploader* drive_uploader_;
|
|
|