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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc

Issue 556803002: [SyncFS] Drop TaskRunner in MetadataDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
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(),
90 database_path_, 89 database_path_,
91 env_override_, 90 env_override_,
92 base::Bind(&SyncEngineInitializer::DidCreateMetadataDatabase, 91 base::Bind(&SyncEngineInitializer::DidCreateMetadataDatabase,
93 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token))); 92 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token)));
94 } 93 }
95 94
96 scoped_ptr<MetadataDatabase> SyncEngineInitializer::PassMetadataDatabase() { 95 scoped_ptr<MetadataDatabase> SyncEngineInitializer::PassMetadataDatabase() {
97 return metadata_database_.Pass(); 96 return metadata_database_.Pass();
98 } 97 }
99 98
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 return; 365 return;
367 } 366 }
368 367
369 util::Log(logging::LOG_VERBOSE, FROM_HERE, 368 util::Log(logging::LOG_VERBOSE, FROM_HERE,
370 "[Initialize] Completed successfully."); 369 "[Initialize] Completed successfully.");
371 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK); 370 SyncTaskManager::NotifyTaskDone(token.Pass(), SYNC_STATUS_OK);
372 } 371 }
373 372
374 } // namespace drive_backend 373 } // namespace drive_backend
375 } // namespace sync_file_system 374 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698