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

Side by Side Diff: sync/internal_api/sync_manager_impl.cc

Issue 477813002: Revert of Let SyncBackupManager keep backup data in memory until shutdown. Only persist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/internal_api/sync_manager_impl.h" 5 #include "sync/internal_api/sync_manager_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 args->restored_keystore_key_for_bootstrapping)); 337 args->restored_keystore_key_for_bootstrapping));
338 sync_encryption_handler_->AddObserver(this); 338 sync_encryption_handler_->AddObserver(this);
339 sync_encryption_handler_->AddObserver(&debug_info_event_listener_); 339 sync_encryption_handler_->AddObserver(&debug_info_event_listener_);
340 sync_encryption_handler_->AddObserver(&js_sync_encryption_handler_observer_); 340 sync_encryption_handler_->AddObserver(&js_sync_encryption_handler_observer_);
341 341
342 base::FilePath absolute_db_path = database_path_; 342 base::FilePath absolute_db_path = database_path_;
343 DCHECK(absolute_db_path.IsAbsolute()); 343 DCHECK(absolute_db_path.IsAbsolute());
344 344
345 scoped_ptr<syncable::DirectoryBackingStore> backing_store = 345 scoped_ptr<syncable::DirectoryBackingStore> backing_store =
346 args->internal_components_factory->BuildDirectoryBackingStore( 346 args->internal_components_factory->BuildDirectoryBackingStore(
347 InternalComponentsFactory::STORAGE_ON_DISK, 347 args->credentials.email,
348 args->credentials.email, absolute_db_path).Pass(); 348 absolute_db_path).Pass();
349 349
350 DCHECK(backing_store.get()); 350 DCHECK(backing_store.get());
351 share_.directory.reset( 351 share_.directory.reset(
352 new syncable::Directory( 352 new syncable::Directory(
353 backing_store.release(), 353 backing_store.release(),
354 unrecoverable_error_handler_.get(), 354 unrecoverable_error_handler_.get(),
355 report_unrecoverable_error_function_, 355 report_unrecoverable_error_function_,
356 sync_encryption_handler_.get(), 356 sync_encryption_handler_.get(),
357 sync_encryption_handler_->GetCryptographerUnsafe())); 357 sync_encryption_handler_->GetCryptographerUnsafe()));
358 share_.sync_credentials = args->credentials; 358 share_.sync_credentials = args->credentials;
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 int SyncManagerImpl::GetDefaultNudgeDelay() { 1139 int SyncManagerImpl::GetDefaultNudgeDelay() {
1140 return kDefaultNudgeDelayMilliseconds; 1140 return kDefaultNudgeDelayMilliseconds;
1141 } 1141 }
1142 1142
1143 // static. 1143 // static.
1144 int SyncManagerImpl::GetPreferencesNudgeDelay() { 1144 int SyncManagerImpl::GetPreferencesNudgeDelay() {
1145 return kPreferencesNudgeDelayMilliseconds; 1145 return kPreferencesNudgeDelayMilliseconds;
1146 } 1146 }
1147 1147
1148 } // namespace syncer 1148 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_backup_manager_unittest.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698