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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 10826193: Remove SyncManager::Init() return value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CreateDirectory assertion Created 8 years, 4 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
« no previous file with comments | « no previous file | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 9b7d19d2c7a57677bb69b5fbf07f0e43af463a78..eb2659de110f3426aef31f0a3d019705c3ad4b83 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -1046,8 +1046,9 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) {
// Make sure that the directory exists before initializing the backend.
// If it already exists, this will do no harm.
- bool success = file_util::CreateDirectory(sync_data_folder_path_);
- DCHECK(success);
+ if (!file_util::CreateDirectory(sync_data_folder_path_)) {
+ DLOG(FATAL) << "Sync Data directory creation failed.";
+ }
DCHECK(!registrar_);
registrar_ = options.registrar;
@@ -1059,7 +1060,7 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) {
sync_manager_ = options.sync_manager_factory->CreateSyncManager(name_);
sync_manager_->AddObserver(this);
- success = sync_manager_->Init(
+ sync_manager_->Init(
sync_data_folder_path_,
options.event_handler,
options.service_url.host() + options.service_url.path(),
@@ -1083,7 +1084,6 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) {
&encryptor_,
options.unrecoverable_error_handler,
options.report_unrecoverable_error_function);
- LOG_IF(ERROR, !success) << "Sync manager initialization failed!";
// Now check the command line to see if we need to simulate an
// unrecoverable error for testing purpose. Note the error is thrown
« no previous file with comments | « no previous file | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698