Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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 = | |
| 
 
Alexei Svitkine (slow)
2013/05/09 16:45:47
I still think we should only do this if the pref i
 
calamity
2013/05/24 08:58:48
Done.
 
 | |
| 755 g_browser_process->profile_manager()->profile_shortcut_manager(); | |
| 756 if (profile_shortcut_manager) | |
| 757 profile_shortcut_manager->CreateProfileIcon(GetPath()); | |
| 758 #endif | |
| 759 | |
| 752 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); | 760 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); | 
| 753 | 761 | 
| 754 DCHECK(!net_pref_observer_.get()); | 762 DCHECK(!net_pref_observer_.get()); | 
| 755 net_pref_observer_.reset(new NetPrefObserver( | 763 net_pref_observer_.reset(new NetPrefObserver( | 
| 756 prefs_.get(), | 764 prefs_.get(), | 
| 757 prerender::PrerenderManagerFactory::GetForProfile(this), | 765 prerender::PrerenderManagerFactory::GetForProfile(this), | 
| 758 predictor_)); | 766 predictor_)); | 
| 759 | 767 | 
| 760 ChromeVersionService::OnProfileLoaded(prefs_.get(), IsNewProfile()); | 768 ChromeVersionService::OnProfileLoaded(prefs_.get(), IsNewProfile()); | 
| 761 DoFinalInit(); | 769 DoFinalInit(); | 
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1164 base::FilePath* cache_path, | 1172 base::FilePath* cache_path, | 
| 1165 int* max_size) { | 1173 int* max_size) { | 
| 1166 DCHECK(cache_path); | 1174 DCHECK(cache_path); | 
| 1167 DCHECK(max_size); | 1175 DCHECK(max_size); | 
| 1168 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1176 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 
| 1169 if (!path.empty()) | 1177 if (!path.empty()) | 
| 1170 *cache_path = path; | 1178 *cache_path = path; | 
| 1171 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1179 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 
| 1172 prefs_->GetInteger(prefs::kDiskCacheSize); | 1180 prefs_->GetInteger(prefs::kDiskCacheSize); | 
| 1173 } | 1181 } | 
| OLD | NEW |