| 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" |  | 
| 42 #include "chrome/browser/net/chrome_net_log.h" | 41 #include "chrome/browser/net/chrome_net_log.h" | 
| 43 #include "chrome/browser/net/net_pref_observer.h" | 42 #include "chrome/browser/net/net_pref_observer.h" | 
| 44 #include "chrome/browser/net/predictor.h" | 43 #include "chrome/browser/net/predictor.h" | 
| 45 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 44 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 
| 46 #include "chrome/browser/net/proxy_service_factory.h" | 45 #include "chrome/browser/net/proxy_service_factory.h" | 
| 47 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
      h" | 46 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
      h" | 
| 48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 47 #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" | 48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
      ory.h" | 
| 50 #include "chrome/browser/net/ssl_config_service_manager.h" | 49 #include "chrome/browser/net/ssl_config_service_manager.h" | 
| 51 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 50 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 815   } else { | 814   } else { | 
| 816 #if defined(ENABLE_EXTENSIONS) | 815 #if defined(ENABLE_EXTENSIONS) | 
| 817     ExtensionPrefValueMapFactory::GetForBrowserContext(this)-> | 816     ExtensionPrefValueMapFactory::GetForBrowserContext(this)-> | 
| 818         ClearAllIncognitoSessionOnlyPreferences(); | 817         ClearAllIncognitoSessionOnlyPreferences(); | 
| 819 #endif | 818 #endif | 
| 820   } | 819   } | 
| 821 | 820 | 
| 822   BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( | 821   BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( | 
| 823       this); | 822       this); | 
| 824 | 823 | 
| 825   if (top_sites_.get()) |  | 
| 826     top_sites_->Shutdown(); |  | 
| 827 |  | 
| 828   if (pref_proxy_config_tracker_) | 824   if (pref_proxy_config_tracker_) | 
| 829     pref_proxy_config_tracker_->DetachFromPrefService(); | 825     pref_proxy_config_tracker_->DetachFromPrefService(); | 
| 830 | 826 | 
| 831   if (host_content_settings_map_.get()) | 827   if (host_content_settings_map_.get()) | 
| 832     host_content_settings_map_->ShutdownOnUIThread(); | 828     host_content_settings_map_->ShutdownOnUIThread(); | 
| 833 | 829 | 
| 834   // This causes the Preferences file to be written to disk. | 830   // This causes the Preferences file to be written to disk. | 
| 835   if (prefs_loaded) | 831   if (prefs_loaded) | 
| 836     SetExitType(EXIT_NORMAL); | 832     SetExitType(EXIT_NORMAL); | 
| 837 } | 833 } | 
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1160   if (profile == static_cast<Profile*>(this)) | 1156   if (profile == static_cast<Profile*>(this)) | 
| 1161     return true; | 1157     return true; | 
| 1162   Profile* otr_profile = off_the_record_profile_.get(); | 1158   Profile* otr_profile = off_the_record_profile_.get(); | 
| 1163   return otr_profile && profile == otr_profile; | 1159   return otr_profile && profile == otr_profile; | 
| 1164 } | 1160 } | 
| 1165 | 1161 | 
| 1166 Time ProfileImpl::GetStartTime() const { | 1162 Time ProfileImpl::GetStartTime() const { | 
| 1167   return start_time_; | 1163   return start_time_; | 
| 1168 } | 1164 } | 
| 1169 | 1165 | 
| 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) | 1166 #if defined(ENABLE_SESSION_SERVICE) | 
| 1183 void ProfileImpl::StopCreateSessionServiceTimer() { | 1167 void ProfileImpl::StopCreateSessionServiceTimer() { | 
| 1184   create_session_service_timer_.Stop(); | 1168   create_session_service_timer_.Stop(); | 
| 1185 } | 1169 } | 
| 1186 | 1170 | 
| 1187 void ProfileImpl::EnsureSessionServiceCreated() { | 1171 void ProfileImpl::EnsureSessionServiceCreated() { | 
| 1188   SessionServiceFactory::GetForProfile(this); | 1172   SessionServiceFactory::GetForProfile(this); | 
| 1189 } | 1173 } | 
| 1190 #endif | 1174 #endif | 
| 1191 | 1175 | 
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1416 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1400 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 
| 1417   domain_reliability::DomainReliabilityService* service = | 1401   domain_reliability::DomainReliabilityService* service = | 
| 1418       domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1402       domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 
| 1419           GetForBrowserContext(this); | 1403           GetForBrowserContext(this); | 
| 1420   if (!service) | 1404   if (!service) | 
| 1421     return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1405     return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 
| 1422 | 1406 | 
| 1423   return service->CreateMonitor( | 1407   return service->CreateMonitor( | 
| 1424       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1408       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 
| 1425 } | 1409 } | 
| OLD | NEW | 
|---|