OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/drive/drive_api_service.h" | 10 #include "chrome/browser/drive/drive_api_service.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // The metadata seems to have been already initialized. Just return with OK. | 80 // The metadata seems to have been already initialized. Just return with OK. |
81 if (sync_context_->GetMetadataDatabase()) { | 81 if (sync_context_->GetMetadataDatabase()) { |
82 util::Log(logging::LOG_VERBOSE, FROM_HERE, | 82 util::Log(logging::LOG_VERBOSE, FROM_HERE, |
83 "[Initialize] Already initialized."); | 83 "[Initialize] Already initialized."); |
84 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); | 84 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); |
85 return; | 85 return; |
86 } | 86 } |
87 | 87 |
88 MetadataDatabase::Create( | 88 MetadataDatabase::Create( |
89 sync_context_->GetWorkerTaskRunner(), | 89 sync_context_->GetWorkerTaskRunner(), |
90 sync_context_->GetFileTaskRunner(), | |
91 database_path_, | 90 database_path_, |
92 env_override_, | 91 env_override_, |
93 base::Bind(&SyncEngineInitializer::DidCreateMetadataDatabase, | 92 base::Bind(&SyncEngineInitializer::DidCreateMetadataDatabase, |
94 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token))); | 93 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token))); |
95 } | 94 } |
96 | 95 |
97 scoped_ptr<MetadataDatabase> SyncEngineInitializer::PassMetadataDatabase() { | 96 scoped_ptr<MetadataDatabase> SyncEngineInitializer::PassMetadataDatabase() { |
98 return metadata_database_.Pass(); | 97 return metadata_database_.Pass(); |
99 } | 98 } |
100 | 99 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 return; | 366 return; |
368 } | 367 } |
369 | 368 |
370 util::Log(logging::LOG_VERBOSE, FROM_HERE, | 369 util::Log(logging::LOG_VERBOSE, FROM_HERE, |
371 "[Initialize] Completed successfully."); | 370 "[Initialize] Completed successfully."); |
372 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); | 371 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); |
373 } | 372 } |
374 | 373 |
375 } // namespace drive_backend | 374 } // namespace drive_backend |
376 } // namespace sync_file_system | 375 } // namespace sync_file_system |
OLD | NEW |