| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile_impl.h" | 5 #include "chrome/browser/profile_impl.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 NotificationService::NoDetails()); | 456 NotificationService::NoDetails()); |
| 457 | 457 |
| 458 tab_restore_service_ = NULL; | 458 tab_restore_service_ = NULL; |
| 459 | 459 |
| 460 StopCreateSessionServiceTimer(); | 460 StopCreateSessionServiceTimer(); |
| 461 // TemplateURLModel schedules a task on the WebDataService from its | 461 // TemplateURLModel schedules a task on the WebDataService from its |
| 462 // destructor. Delete it first to ensure the task gets scheduled before we | 462 // destructor. Delete it first to ensure the task gets scheduled before we |
| 463 // shut down the database. | 463 // shut down the database. |
| 464 template_url_model_.reset(); | 464 template_url_model_.reset(); |
| 465 | 465 |
| 466 // The download manager queries the history system and should be deleted | 466 // DownloadManager is lazily created, so check before accessing it. |
| 467 // before the history is shutdown so it can properly cancel all requests. | 467 if (download_manager_.get()) { |
| 468 download_manager_ = NULL; | 468 // The download manager queries the history system and should be shutdown |
| 469 // before the history is shutdown so it can properly cancel all requests. |
| 470 download_manager_->Shutdown(); |
| 471 download_manager_ = NULL; |
| 472 } |
| 469 | 473 |
| 470 // The theme provider provides bitmaps to whoever wants them. | 474 // The theme provider provides bitmaps to whoever wants them. |
| 471 theme_provider_.reset(); | 475 theme_provider_.reset(); |
| 472 | 476 |
| 473 // Remove pref observers. | 477 // Remove pref observers. |
| 474 PrefService* prefs = GetPrefs(); | 478 PrefService* prefs = GetPrefs(); |
| 475 prefs->RemovePrefObserver(prefs::kSpellCheckDictionary, this); | 479 prefs->RemovePrefObserver(prefs::kSpellCheckDictionary, this); |
| 476 prefs->RemovePrefObserver(prefs::kEnableSpellCheck, this); | 480 prefs->RemovePrefObserver(prefs::kEnableSpellCheck, this); |
| 477 prefs->RemovePrefObserver(prefs::kEnableAutoSpellCorrect, this); | 481 prefs->RemovePrefObserver(prefs::kEnableAutoSpellCorrect, this); |
| 478 | 482 |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 #if defined(OS_CHROMEOS) | 1279 #if defined(OS_CHROMEOS) |
| 1276 chromeos::ProxyConfigServiceImpl* | 1280 chromeos::ProxyConfigServiceImpl* |
| 1277 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1281 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
| 1278 if (!chromeos_proxy_config_service_impl_) { | 1282 if (!chromeos_proxy_config_service_impl_) { |
| 1279 chromeos_proxy_config_service_impl_ = | 1283 chromeos_proxy_config_service_impl_ = |
| 1280 new chromeos::ProxyConfigServiceImpl(); | 1284 new chromeos::ProxyConfigServiceImpl(); |
| 1281 } | 1285 } |
| 1282 return chromeos_proxy_config_service_impl_; | 1286 return chromeos_proxy_config_service_impl_; |
| 1283 } | 1287 } |
| 1284 #endif // defined(OS_CHROMEOS) | 1288 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |