| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 | 454 |
| 455 FilePath ProfileImpl::last_selected_directory() { | 455 FilePath ProfileImpl::last_selected_directory() { |
| 456 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); | 456 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); |
| 457 } | 457 } |
| 458 | 458 |
| 459 void ProfileImpl::set_last_selected_directory(const FilePath& path) { | 459 void ProfileImpl::set_last_selected_directory(const FilePath& path) { |
| 460 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); | 460 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); |
| 461 } | 461 } |
| 462 | 462 |
| 463 ProfileImpl::~ProfileImpl() { | 463 ProfileImpl::~ProfileImpl() { |
| 464 content::NotificationService::current()->Notify( | 464 MaybeSendDestroyedNotification(); |
| 465 chrome::NOTIFICATION_PROFILE_DESTROYED, | 465 |
| 466 content::Source<Profile>(this), | |
| 467 content::NotificationService::NoDetails()); | |
| 468 bool prefs_loaded = prefs_->GetInitializationStatus() != | 466 bool prefs_loaded = prefs_->GetInitializationStatus() != |
| 469 PrefService::INITIALIZATION_STATUS_WAITING; | 467 PrefService::INITIALIZATION_STATUS_WAITING; |
| 470 | 468 |
| 471 #if defined(ENABLE_SESSION_SERVICE) | 469 #if defined(ENABLE_SESSION_SERVICE) |
| 472 StopCreateSessionServiceTimer(); | 470 StopCreateSessionServiceTimer(); |
| 473 #endif | 471 #endif |
| 474 | 472 |
| 475 // Remove pref observers | 473 // Remove pref observers |
| 476 pref_change_registrar_.RemoveAll(); | 474 pref_change_registrar_.RemoveAll(); |
| 477 | 475 |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 if (!path.empty()) | 1072 if (!path.empty()) |
| 1075 *cache_path = path; | 1073 *cache_path = path; |
| 1076 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1074 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1077 prefs_->GetInteger(prefs::kDiskCacheSize); | 1075 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1078 } | 1076 } |
| 1079 | 1077 |
| 1080 base::Callback<ChromeURLDataManagerBackend*(void)> | 1078 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 1081 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1079 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 1082 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1080 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 1083 } | 1081 } |
| OLD | NEW |