| Index: chrome/browser/sync_file_system/local/local_file_sync_service.cc
|
| diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service.cc b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
|
| index 8666fb3f43a4763f12dcb805168877b73fa98326..51c908a873537ec75f52cfa7f2d8edce786a0209 100644
|
| --- a/chrome/browser/sync_file_system/local/local_file_sync_service.cc
|
| +++ b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
|
| @@ -96,16 +96,15 @@ void LocalFileSyncService::OriginChangeMap::SetOriginEnabled(
|
|
|
| // LocalFileSyncService -------------------------------------------------------
|
|
|
| -LocalFileSyncService::LocalFileSyncService(Profile* profile)
|
| - : profile_(profile),
|
| - sync_context_(new LocalFileSyncContext(
|
| - profile_->GetPath(),
|
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
|
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)
|
| - .get())),
|
| - local_change_processor_(NULL) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - sync_context_->AddOriginChangeObserver(this);
|
| +scoped_ptr<LocalFileSyncService> LocalFileSyncService::Create(
|
| + Profile* profile) {
|
| + return make_scoped_ptr(new LocalFileSyncService(profile, NULL));
|
| +}
|
| +
|
| +scoped_ptr<LocalFileSyncService> LocalFileSyncService::CreateForTesting(
|
| + Profile* profile,
|
| + leveldb::Env* env) {
|
| + return make_scoped_ptr(new LocalFileSyncService(profile, env));
|
| }
|
|
|
| LocalFileSyncService::~LocalFileSyncService() {
|
| @@ -320,6 +319,20 @@ void LocalFileSyncService::SetOriginEnabled(const GURL& origin, bool enabled) {
|
| origin_change_map_.SetOriginEnabled(origin, enabled);
|
| }
|
|
|
| +LocalFileSyncService::LocalFileSyncService(Profile* profile,
|
| + leveldb::Env* env_override)
|
| + : profile_(profile),
|
| + sync_context_(new LocalFileSyncContext(
|
| + profile_->GetPath(),
|
| + env_override,
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)
|
| + .get())),
|
| + local_change_processor_(NULL) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + sync_context_->AddOriginChangeObserver(this);
|
| +}
|
| +
|
| void LocalFileSyncService::DidInitializeFileSystemContext(
|
| const GURL& app_origin,
|
| fileapi::FileSystemContext* file_system_context,
|
|
|