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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 7 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
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 5cb71f92753ae10aca74163b74d9884869357d60..605cd85fb93b7d00e62faeb582d2a77afb1cbcfa 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -733,6 +733,18 @@ void ProfileImpl::OnPrefsLoaded(bool success) {
// TODO(sky): remove this in a couple of releases (m28ish).
prefs_->SetBoolean(prefs::kSessionExitedCleanly, true);
+#if defined(OS_WIN)
+ if (!prefs_->GetBoolean(prefs::kProfileIconCreated)) {
+ // Ensure the profile's icon file has been created.
Alexei Svitkine (slow) 2013/05/24 14:43:51 Nit: Indent 2 more.
calamity 2013/05/31 04:07:27 Done.
+ ProfileShortcutManager* profile_shortcut_manager =
+ g_browser_process->profile_manager()->profile_shortcut_manager();
+ if (profile_shortcut_manager) {
+ profile_shortcut_manager->CreateProfileIcon(GetPath());
+ prefs_->SetBoolean(prefs::kProfileIconCreated, true);
Alexei Svitkine (slow) 2013/05/24 14:43:51 I would still like to have this pref set only afte
calamity 2013/05/31 04:07:27 I'm a little hesitant to do this if the name is go
Alexei Svitkine (slow) 2013/05/31 13:48:38 I'm okay with the having the callback exposed too.
calamity 2013/06/04 01:24:57 Done.
+ }
+ }
+#endif
+
ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);
DCHECK(!net_pref_observer_);

Powered by Google App Engine
This is Rietveld 408576698