Skip to content

Commit

Permalink
Merge pull request #27378 from brave/ios-cr133-profile-creation-fix
Browse files Browse the repository at this point in the history
[iOS] Use original initial profile name for main profile creation
  • Loading branch information
kylehickinson authored and mkarolin committed Jan 28, 2025
1 parent 47aaac0 commit 26daf8b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ios/app/brave_core_main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
// Initialize and set the main browser state.
auto* localState = GetApplicationContext()->GetLocalState();
auto* profileManager = GetApplicationContext()->GetProfileManager();
std::string profileName = localState->GetString(prefs::kLastUsedProfile);
if (profileName.empty()) {
profileName = profileManager->ReserveNewProfileName();
localState->SetString(prefs::kLastUsedProfile, profileName);
}
DCHECK(!profileName.empty());
std::string profileName =
"Default"; // kIOSChromeInitialProfile which is now removed
// Set this as the last used profile always so that its saved for the future
// where we may have multiple profile support and need to read it from local
// state before creating the profile
localState->SetString(prefs::kLastUsedProfile, profileName);
ScopedAllowBlockingForProfile allow_blocking;
return profileManager->CreateProfile(profileName);
}
Expand Down

0 comments on commit 26daf8b

Please sign in to comment.