| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" | 60 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" |
| 61 #include "chrome/browser/profiles/profile_destroyer.h" | 61 #include "chrome/browser/profiles/profile_destroyer.h" |
| 62 #include "chrome/browser/profiles/profile_info_cache.h" | 62 #include "chrome/browser/profiles/profile_info_cache.h" |
| 63 #include "chrome/browser/profiles/profile_manager.h" | 63 #include "chrome/browser/profiles/profile_manager.h" |
| 64 #include "chrome/browser/profiles/profile_metrics.h" | 64 #include "chrome/browser/profiles/profile_metrics.h" |
| 65 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 65 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 66 #include "chrome/browser/services/gcm/gcm_profile_service.h" | 66 #include "chrome/browser/services/gcm/gcm_profile_service.h" |
| 67 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 67 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
| 68 #include "chrome/browser/services/gcm/push_messaging_service_impl.h" | 68 #include "chrome/browser/services/gcm/push_messaging_service_impl.h" |
| 69 #include "chrome/browser/sessions/session_service_factory.h" | 69 #include "chrome/browser/sessions/session_service_factory.h" |
| 70 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
| 71 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
| 70 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 72 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 71 #include "chrome/common/chrome_constants.h" | 73 #include "chrome/common/chrome_constants.h" |
| 72 #include "chrome/common/chrome_paths_internal.h" | 74 #include "chrome/common/chrome_paths_internal.h" |
| 73 #include "chrome/common/chrome_switches.h" | 75 #include "chrome/common/chrome_switches.h" |
| 74 #include "chrome/common/chrome_version_info.h" | 76 #include "chrome/common/chrome_version_info.h" |
| 75 #include "chrome/common/pref_names.h" | 77 #include "chrome/common/pref_names.h" |
| 76 #include "chrome/common/url_constants.h" | 78 #include "chrome/common/url_constants.h" |
| 77 #include "components/bookmarks/browser/bookmark_model.h" | 79 #include "components/bookmarks/browser/bookmark_model.h" |
| 78 #include "components/dom_distiller/content/dom_distiller_viewer_source.h" | 80 #include "components/dom_distiller/content/dom_distiller_viewer_source.h" |
| 79 #include "components/dom_distiller/core/url_constants.h" | 81 #include "components/dom_distiller/core/url_constants.h" |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 #else | 1054 #else |
| 1053 return NULL; | 1055 return NULL; |
| 1054 #endif | 1056 #endif |
| 1055 } | 1057 } |
| 1056 | 1058 |
| 1057 content::PushMessagingService* ProfileImpl::GetPushMessagingService() { | 1059 content::PushMessagingService* ProfileImpl::GetPushMessagingService() { |
| 1058 return gcm::GCMProfileServiceFactory::GetForProfile( | 1060 return gcm::GCMProfileServiceFactory::GetForProfile( |
| 1059 this)->push_messaging_service(); | 1061 this)->push_messaging_service(); |
| 1060 } | 1062 } |
| 1061 | 1063 |
| 1064 content::SSLHostStateDelegate* ProfileImpl::GetSSLHostStateDelegate() { |
| 1065 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); |
| 1066 } |
| 1067 |
| 1062 bool ProfileImpl::IsSameProfile(Profile* profile) { | 1068 bool ProfileImpl::IsSameProfile(Profile* profile) { |
| 1063 if (profile == static_cast<Profile*>(this)) | 1069 if (profile == static_cast<Profile*>(this)) |
| 1064 return true; | 1070 return true; |
| 1065 Profile* otr_profile = off_the_record_profile_.get(); | 1071 Profile* otr_profile = off_the_record_profile_.get(); |
| 1066 return otr_profile && profile == otr_profile; | 1072 return otr_profile && profile == otr_profile; |
| 1067 } | 1073 } |
| 1068 | 1074 |
| 1069 Time ProfileImpl::GetStartTime() const { | 1075 Time ProfileImpl::GetStartTime() const { |
| 1070 return start_time_; | 1076 return start_time_; |
| 1071 } | 1077 } |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 ProfileImpl::CreateDomainReliabilityMonitor() { | 1349 ProfileImpl::CreateDomainReliabilityMonitor() { |
| 1344 domain_reliability::DomainReliabilityService* service = | 1350 domain_reliability::DomainReliabilityService* service = |
| 1345 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1351 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1346 GetForBrowserContext(this); | 1352 GetForBrowserContext(this); |
| 1347 if (!service) | 1353 if (!service) |
| 1348 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1354 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1349 | 1355 |
| 1350 return service->CreateMonitor( | 1356 return service->CreateMonitor( |
| 1351 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1357 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1352 } | 1358 } |
| OLD | NEW |