Skip to content

Commit

Permalink
Check and set kOtherBookmarksMigrated in BraveProfileSyncServiceImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Feb 8, 2020
1 parent dbc8ae5 commit 0a1f04a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/brave_sync/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if (enable_brave_sync) {
":public",
":static_resources",
"//base",
"//brave/common:common",
"//chrome/common",
"//components/bookmarks/browser",
"//components/bookmarks/common",
Expand Down
7 changes: 6 additions & 1 deletion components/brave_sync/brave_profile_sync_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "brave/common/pref_names.h"
#include "brave/components/brave_sync/brave_sync_prefs.h"
#include "brave/components/brave_sync/brave_sync_service_observer.h"
#include "brave/components/brave_sync/client/brave_sync_client_impl.h"
Expand All @@ -28,6 +29,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/chrome_sync_client.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/prefs/pref_service.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/sync/engine_impl/syncer.h"
#include "content/public/browser/browser_thread.h"
Expand Down Expand Up @@ -488,7 +490,10 @@ void BraveProfileSyncServiceImpl::OnSyncReady() {
ProfileSyncService::GetUserSettings()->SetSyncRequested(true);
}

BraveMigrateOtherNodeFolder(model_);
if (!sync_client_->GetPrefService()->GetBoolean(kOtherBookmarksMigrated)) {
BraveMigrateOtherNodeFolder(model_);
sync_client_->GetPrefService()->SetBoolean(kOtherBookmarksMigrated, true);
}
}

syncer::ModelTypeSet BraveProfileSyncServiceImpl::GetPreferredDataTypes()
Expand Down

0 comments on commit 0a1f04a

Please sign in to comment.