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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 | 852 |
853 HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() { | 853 HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() { |
854 if (!host_content_settings_map_.get()) { | 854 if (!host_content_settings_map_.get()) { |
855 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 855 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
856 } | 856 } |
857 return host_content_settings_map_.get(); | 857 return host_content_settings_map_.get(); |
858 } | 858 } |
859 | 859 |
860 content::GeolocationPermissionContext* | 860 content::GeolocationPermissionContext* |
861 ProfileImpl::GetGeolocationPermissionContext() { | 861 ProfileImpl::GetGeolocationPermissionContext() { |
862 if (!geolocation_permission_context_.get()) { | 862 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); |
863 geolocation_permission_context_ = | |
864 ChromeGeolocationPermissionContextFactory::Create(this); | |
865 } | |
866 return geolocation_permission_context_.get(); | |
867 } | 863 } |
868 | 864 |
869 content::SpeechRecognitionPreferences* | 865 content::SpeechRecognitionPreferences* |
870 ProfileImpl::GetSpeechRecognitionPreferences() { | 866 ProfileImpl::GetSpeechRecognitionPreferences() { |
871 #if defined(ENABLE_INPUT_SPEECH) | 867 #if defined(ENABLE_INPUT_SPEECH) |
872 return ChromeSpeechRecognitionPreferences::GetForProfile(this); | 868 return ChromeSpeechRecognitionPreferences::GetForProfile(this); |
873 #else | 869 #else |
874 return NULL; | 870 return NULL; |
875 #endif | 871 #endif |
876 } | 872 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 if (!path.empty()) | 1151 if (!path.empty()) |
1156 *cache_path = path; | 1152 *cache_path = path; |
1157 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1153 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1158 prefs_->GetInteger(prefs::kDiskCacheSize); | 1154 prefs_->GetInteger(prefs::kDiskCacheSize); |
1159 } | 1155 } |
1160 | 1156 |
1161 base::Callback<ChromeURLDataManagerBackend*(void)> | 1157 base::Callback<ChromeURLDataManagerBackend*(void)> |
1162 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1158 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1163 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1159 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1164 } | 1160 } |
OLD | NEW |