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()); | 251 MaybeSendDestroyedNotification(); |
252 content::NotificationService::current()->Notify( | |
253 chrome::NOTIFICATION_PROFILE_DESTROYED, | |
254 content::Source<Profile>(static_cast<Profile*>(this)), | |
255 content::NotificationService::NoDetails()); | |
256 | 252 |
257 profile_dependency_manager_->DestroyProfileServices(this); | 253 profile_dependency_manager_->DestroyProfileServices(this); |
258 | 254 |
259 if (host_content_settings_map_) | 255 if (host_content_settings_map_) |
260 host_content_settings_map_->ShutdownOnUIThread(); | 256 host_content_settings_map_->ShutdownOnUIThread(); |
261 | 257 |
262 DestroyTopSites(); | 258 DestroyTopSites(); |
263 DestroyFaviconService(); | 259 DestroyFaviconService(); |
264 | 260 |
265 if (pref_proxy_config_tracker_.get()) | 261 if (pref_proxy_config_tracker_.get()) |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 } | 725 } |
730 | 726 |
731 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { | 727 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { |
732 return true; | 728 return true; |
733 } | 729 } |
734 | 730 |
735 base::Callback<ChromeURLDataManagerBackend*(void)> | 731 base::Callback<ChromeURLDataManagerBackend*(void)> |
736 TestingProfile::GetChromeURLDataManagerBackendGetter() const { | 732 TestingProfile::GetChromeURLDataManagerBackendGetter() const { |
737 return base::Callback<ChromeURLDataManagerBackend*(void)>(); | 733 return base::Callback<ChromeURLDataManagerBackend*(void)>(); |
738 } | 734 } |
OLD | NEW |