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

Side by Side 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: use important_file_handler for icon file creation 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 unified diff | Download patch
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 "chrome/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 } else { 742 } else {
743 last_session_exit_type_ = 743 last_session_exit_type_ =
744 SessionTypePrefValueToExitType(exit_type_pref_value); 744 SessionTypePrefValueToExitType(exit_type_pref_value);
745 } 745 }
746 // Mark the session as open. 746 // Mark the session as open.
747 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed); 747 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed);
748 // Force this to true in case we fallback and use it. 748 // Force this to true in case we fallback and use it.
749 // TODO(sky): remove this in a couple of releases (m28ish). 749 // TODO(sky): remove this in a couple of releases (m28ish).
750 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); 750 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true);
751 751
752 #if defined(OS_WIN)
753 // Ensure the profile's icon file has been created.
754 ProfileShortcutManager* profile_shortcut_manager =
755 g_browser_process->profile_manager()->profile_shortcut_manager();
756 profile_shortcut_manager->CreateProfileIcon(GetPath());
gab 2013/05/08 13:01:08 Why call this from here when it was already called
calamity 2013/05/09 06:12:16 chrome_browser_main only runs for the first loaded
757 #endif
758
752 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); 759 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);
753 760
754 DCHECK(!net_pref_observer_.get()); 761 DCHECK(!net_pref_observer_.get());
755 net_pref_observer_.reset(new NetPrefObserver( 762 net_pref_observer_.reset(new NetPrefObserver(
756 prefs_.get(), 763 prefs_.get(),
757 prerender::PrerenderManagerFactory::GetForProfile(this), 764 prerender::PrerenderManagerFactory::GetForProfile(this),
758 predictor_)); 765 predictor_));
759 766
760 ChromeVersionService::OnProfileLoaded(prefs_.get(), IsNewProfile()); 767 ChromeVersionService::OnProfileLoaded(prefs_.get(), IsNewProfile());
761 DoFinalInit(); 768 DoFinalInit();
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 base::FilePath* cache_path, 1171 base::FilePath* cache_path,
1165 int* max_size) { 1172 int* max_size) {
1166 DCHECK(cache_path); 1173 DCHECK(cache_path);
1167 DCHECK(max_size); 1174 DCHECK(max_size);
1168 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1175 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1169 if (!path.empty()) 1176 if (!path.empty())
1170 *cache_path = path; 1177 *cache_path = path;
1171 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1178 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1172 prefs_->GetInteger(prefs::kDiskCacheSize); 1179 prefs_->GetInteger(prefs::kDiskCacheSize);
1173 } 1180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698