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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 #include "chrome/browser/background/background_contents_service_factory.h" | 31 #include "chrome/browser/background/background_contents_service_factory.h" |
| 32 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 32 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 33 #include "chrome/browser/browser_process.h" | 33 #include "chrome/browser/browser_process.h" |
| 34 #include "chrome/browser/chrome_notification_types.h" | 34 #include "chrome/browser/chrome_notification_types.h" |
| 35 #include "chrome/browser/content_settings/cookie_settings.h" | 35 #include "chrome/browser/content_settings/cookie_settings.h" |
| 36 #include "chrome/browser/dom_distiller/profile_utils.h" | 36 #include "chrome/browser/dom_distiller/profile_utils.h" |
| 37 #include "chrome/browser/domain_reliability/service_factory.h" | 37 #include "chrome/browser/domain_reliability/service_factory.h" |
| 38 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 38 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 39 #include "chrome/browser/download/download_service.h" | 39 #include "chrome/browser/download/download_service.h" |
| 40 #include "chrome/browser/download/download_service_factory.h" | 40 #include "chrome/browser/download/download_service_factory.h" |
| 41 #include "chrome/browser/history/top_sites.h" | 41 #include "chrome/browser/history/top_sites_provider.h" |
|
sdefresne
2014/12/19 15:11:42
Remove those three includes.
Jitu( very slow this week)
2014/12/26 14:04:28
Done.
Added for testing the code forgot to remove
| |
| 42 #include "chrome/browser/history/top_sites_service.h" | |
| 43 #include "chrome/browser/history/top_sites_service_factory.h" | |
| 42 #include "chrome/browser/net/chrome_net_log.h" | 44 #include "chrome/browser/net/chrome_net_log.h" |
| 43 #include "chrome/browser/net/net_pref_observer.h" | 45 #include "chrome/browser/net/net_pref_observer.h" |
| 44 #include "chrome/browser/net/predictor.h" | 46 #include "chrome/browser/net/predictor.h" |
| 45 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 47 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 46 #include "chrome/browser/net/proxy_service_factory.h" | 48 #include "chrome/browser/net/proxy_service_factory.h" |
| 47 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" | 49 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" |
| 48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 50 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 49 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" | 51 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" |
| 50 #include "chrome/browser/net/ssl_config_service_manager.h" | 52 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 51 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 53 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 815 } else { | 817 } else { |
| 816 #if defined(ENABLE_EXTENSIONS) | 818 #if defined(ENABLE_EXTENSIONS) |
| 817 ExtensionPrefValueMapFactory::GetForBrowserContext(this)-> | 819 ExtensionPrefValueMapFactory::GetForBrowserContext(this)-> |
| 818 ClearAllIncognitoSessionOnlyPreferences(); | 820 ClearAllIncognitoSessionOnlyPreferences(); |
| 819 #endif | 821 #endif |
| 820 } | 822 } |
| 821 | 823 |
| 822 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( | 824 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( |
| 823 this); | 825 this); |
| 824 | 826 |
| 825 if (top_sites_.get()) | 827 // if (top_sites_service_.get()) |
|
sdefresne
2014/12/19 15:11:42
Dead code, remove.
Jitu( very slow this week)
2014/12/26 14:04:28
Done.
| |
| 826 top_sites_->Shutdown(); | 828 // top_sites_service_->Shutdown(); |
| 827 | 829 |
| 828 if (pref_proxy_config_tracker_) | 830 if (pref_proxy_config_tracker_) |
| 829 pref_proxy_config_tracker_->DetachFromPrefService(); | 831 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 830 | 832 |
| 831 if (host_content_settings_map_.get()) | 833 if (host_content_settings_map_.get()) |
| 832 host_content_settings_map_->ShutdownOnUIThread(); | 834 host_content_settings_map_->ShutdownOnUIThread(); |
| 833 | 835 |
| 834 // This causes the Preferences file to be written to disk. | 836 // This causes the Preferences file to be written to disk. |
| 835 if (prefs_loaded) | 837 if (prefs_loaded) |
| 836 SetExitType(EXIT_NORMAL); | 838 SetExitType(EXIT_NORMAL); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1160 if (profile == static_cast<Profile*>(this)) | 1162 if (profile == static_cast<Profile*>(this)) |
| 1161 return true; | 1163 return true; |
| 1162 Profile* otr_profile = off_the_record_profile_.get(); | 1164 Profile* otr_profile = off_the_record_profile_.get(); |
| 1163 return otr_profile && profile == otr_profile; | 1165 return otr_profile && profile == otr_profile; |
| 1164 } | 1166 } |
| 1165 | 1167 |
| 1166 Time ProfileImpl::GetStartTime() const { | 1168 Time ProfileImpl::GetStartTime() const { |
| 1167 return start_time_; | 1169 return start_time_; |
| 1168 } | 1170 } |
| 1169 | 1171 |
| 1170 history::TopSites* ProfileImpl::GetTopSites() { | |
| 1171 if (!top_sites_.get()) { | |
| 1172 top_sites_ = history::TopSites::Create( | |
| 1173 this, GetPath().Append(chrome::kTopSitesFilename)); | |
| 1174 } | |
| 1175 return top_sites_.get(); | |
| 1176 } | |
| 1177 | |
| 1178 history::TopSites* ProfileImpl::GetTopSitesWithoutCreating() { | |
| 1179 return top_sites_.get(); | |
| 1180 } | |
| 1181 | |
| 1182 #if defined(ENABLE_SESSION_SERVICE) | 1172 #if defined(ENABLE_SESSION_SERVICE) |
| 1183 void ProfileImpl::StopCreateSessionServiceTimer() { | 1173 void ProfileImpl::StopCreateSessionServiceTimer() { |
| 1184 create_session_service_timer_.Stop(); | 1174 create_session_service_timer_.Stop(); |
| 1185 } | 1175 } |
| 1186 | 1176 |
| 1187 void ProfileImpl::EnsureSessionServiceCreated() { | 1177 void ProfileImpl::EnsureSessionServiceCreated() { |
| 1188 SessionServiceFactory::GetForProfile(this); | 1178 SessionServiceFactory::GetForProfile(this); |
| 1189 } | 1179 } |
| 1190 #endif | 1180 #endif |
| 1191 | 1181 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1416 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1406 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1417 domain_reliability::DomainReliabilityService* service = | 1407 domain_reliability::DomainReliabilityService* service = |
| 1418 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1408 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1419 GetForBrowserContext(this); | 1409 GetForBrowserContext(this); |
| 1420 if (!service) | 1410 if (!service) |
| 1421 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1411 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1422 | 1412 |
| 1423 return service->CreateMonitor( | 1413 return service->CreateMonitor( |
| 1424 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1414 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1425 } | 1415 } |
| OLD | NEW |