summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-05 18:00:21 +0000
committerzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-05 18:00:21 +0000
commit4f67d8a72d73ca17ae35434e3301e708fddd2970 (patch)
treedb2df22c02cba0f13ca33982fff06b7d4955b225 /chrome/browser
parentf4b8eec380a863f55d64210076c11a17f3218353 (diff)
downloadchromium_src-4f67d8a72d73ca17ae35434e3301e708fddd2970.zip
chromium_src-4f67d8a72d73ca17ae35434e3301e708fddd2970.tar.gz
chromium_src-4f67d8a72d73ca17ae35434e3301e708fddd2970.tar.bz2
Fix a crash when enabling bookmark sync.
BUG=31560 TEST=Enable bookmark sync, then attempt to add a bookmark. Review URL: http://codereview.chromium.org/526007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 02bf47c..5f7a203 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -54,19 +54,10 @@ ProfileSyncService::ProfileSyncService(Profile* profile)
is_auth_in_progress_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(wizard_(this)),
unrecoverable_error_detected_(false) {
-
- // Register associator impls for all currently synced data types, and hook
- // them up to the associated change processors. If you add a new data type
- // and want that data type to be synced, call CreateGlue with appropriate
- // association and change processing implementations.
-
- // Bookmarks.
- InstallGlue<BookmarkModelAssociator, BookmarkChangeProcessor>();
}
ProfileSyncService::~ProfileSyncService() {
Shutdown(false);
- STLDeleteElements(&change_processors_);
}
void ProfileSyncService::Initialize() {
@@ -156,6 +147,13 @@ void ProfileSyncService::StartUp() {
if (backend_.get())
return;
+ // Register associator impls for all currently synced data types, and hook
+ // them up to the associated change processors. If you add a new data type
+ // and want that data type to be synced, call CreateGlue with appropriate
+ // association and change processing implementations.
+ // Bookmarks.
+ InstallGlue<BookmarkModelAssociator, BookmarkChangeProcessor>();
+
last_synced_time_ = base::Time::FromInternalValue(
profile_->GetPrefs()->GetInt64(prefs::kSyncLastSyncedTime));
@@ -184,6 +182,8 @@ void ProfileSyncService::Shutdown(bool sync_disabled) {
model_associator_->DisassociateModels();
model_associator_->CleanupAllAssociators();
+ STLDeleteElements(&change_processors_);
+
// Clear various flags.
is_auth_in_progress_ = false;
backend_initialized_ = false;