| 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/test/base/testing_profile.h" | 5 #include "chrome/test/base/testing_profile.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 content::NotificationService::current()->Notify( | 241 content::NotificationService::current()->Notify( |
| 242 chrome::NOTIFICATION_PROFILE_CREATED, | 242 chrome::NOTIFICATION_PROFILE_CREATED, |
| 243 content::Source<Profile>(static_cast<Profile*>(this)), | 243 content::Source<Profile>(static_cast<Profile*>(this)), |
| 244 content::NotificationService::NoDetails()); | 244 content::NotificationService::NoDetails()); |
| 245 | 245 |
| 246 if (delegate_) | 246 if (delegate_) |
| 247 delegate_->OnProfileCreated(this, true, false); | 247 delegate_->OnProfileCreated(this, true, false); |
| 248 } | 248 } |
| 249 | 249 |
| 250 TestingProfile::~TestingProfile() { | 250 TestingProfile::~TestingProfile() { |
| 251 DCHECK(content::NotificationService::current()); | |
| 252 content::NotificationService::current()->Notify( | |
| 253 chrome::NOTIFICATION_PROFILE_DESTROYED, | |
| 254 content::Source<Profile>(static_cast<Profile*>(this)), | |
| 255 content::NotificationService::NoDetails()); | |
| 256 | |
| 257 profile_dependency_manager_->DestroyProfileServices(this); | 251 profile_dependency_manager_->DestroyProfileServices(this); |
| 258 | 252 |
| 259 if (host_content_settings_map_) | 253 if (host_content_settings_map_) |
| 260 host_content_settings_map_->ShutdownOnUIThread(); | 254 host_content_settings_map_->ShutdownOnUIThread(); |
| 261 | 255 |
| 262 DestroyTopSites(); | 256 DestroyTopSites(); |
| 263 DestroyFaviconService(); | 257 DestroyFaviconService(); |
| 264 | 258 |
| 265 if (pref_proxy_config_tracker_.get()) | 259 if (pref_proxy_config_tracker_.get()) |
| 266 pref_proxy_config_tracker_->DetachFromPrefService(); | 260 pref_proxy_config_tracker_->DetachFromPrefService(); |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } | 723 } |
| 730 | 724 |
| 731 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { | 725 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { |
| 732 return true; | 726 return true; |
| 733 } | 727 } |
| 734 | 728 |
| 735 base::Callback<ChromeURLDataManagerBackend*(void)> | 729 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 736 TestingProfile::GetChromeURLDataManagerBackendGetter() const { | 730 TestingProfile::GetChromeURLDataManagerBackendGetter() const { |
| 737 return base::Callback<ChromeURLDataManagerBackend*(void)>(); | 731 return base::Callback<ChromeURLDataManagerBackend*(void)>(); |
| 738 } | 732 } |
| OLD | NEW |