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.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/browser_theme_provider.h" | 21 #include "chrome/browser/browser_theme_provider.h" |
22 #include "chrome/browser/chrome_thread.h" | 22 #include "chrome/browser/chrome_thread.h" |
23 #include "chrome/browser/dom_ui/ntp_resource_cache.h" | 23 #include "chrome/browser/dom_ui/ntp_resource_cache.h" |
24 #include "chrome/browser/download/download_manager.h" | 24 #include "chrome/browser/download/download_manager.h" |
25 #include "chrome/browser/extensions/extension_devtools_manager.h" | 25 #include "chrome/browser/extensions/extension_devtools_manager.h" |
26 #include "chrome/browser/extensions/extension_message_service.h" | 26 #include "chrome/browser/extensions/extension_message_service.h" |
27 #include "chrome/browser/extensions/extension_process_manager.h" | 27 #include "chrome/browser/extensions/extension_process_manager.h" |
28 #include "chrome/browser/extensions/extensions_service.h" | 28 #include "chrome/browser/extensions/extensions_service.h" |
29 #include "chrome/browser/extensions/user_script_master.h" | 29 #include "chrome/browser/extensions/user_script_master.h" |
30 #include "chrome/browser/favicon_service.h" | 30 #include "chrome/browser/favicon_service.h" |
| 31 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
31 #include "chrome/browser/spellcheck_host.h" | 32 #include "chrome/browser/spellcheck_host.h" |
32 #include "chrome/browser/transport_security_persister.h" | 33 #include "chrome/browser/transport_security_persister.h" |
33 #include "chrome/browser/history/history.h" | 34 #include "chrome/browser/history/history.h" |
34 #include "chrome/browser/host_content_settings_map.h" | 35 #include "chrome/browser/host_content_settings_map.h" |
35 #include "chrome/browser/host_zoom_map.h" | 36 #include "chrome/browser/host_zoom_map.h" |
36 #include "chrome/browser/in_process_webkit/webkit_context.h" | 37 #include "chrome/browser/in_process_webkit/webkit_context.h" |
37 #include "chrome/browser/net/chrome_url_request_context.h" | 38 #include "chrome/browser/net/chrome_url_request_context.h" |
38 #include "chrome/browser/net/ssl_config_service_manager.h" | 39 #include "chrome/browser/net/ssl_config_service_manager.h" |
39 #include "chrome/browser/notifications/desktop_notification_service.h" | 40 #include "chrome/browser/notifications/desktop_notification_service.h" |
40 #include "chrome/browser/password_manager/password_store_default.h" | 41 #include "chrome/browser/password_manager/password_store_default.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 401 } |
401 | 402 |
402 virtual HostContentSettingsMap* GetHostContentSettingsMap() { | 403 virtual HostContentSettingsMap* GetHostContentSettingsMap() { |
403 return profile_->GetHostContentSettingsMap(); | 404 return profile_->GetHostContentSettingsMap(); |
404 } | 405 } |
405 | 406 |
406 virtual HostZoomMap* GetHostZoomMap() { | 407 virtual HostZoomMap* GetHostZoomMap() { |
407 return profile_->GetHostZoomMap(); | 408 return profile_->GetHostZoomMap(); |
408 } | 409 } |
409 | 410 |
| 411 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() { |
| 412 return profile_->GetGeolocationContentSettingsMap(); |
| 413 } |
| 414 |
410 virtual Blacklist* GetPrivacyBlacklist() { | 415 virtual Blacklist* GetPrivacyBlacklist() { |
411 return profile_->GetPrivacyBlacklist(); | 416 return profile_->GetPrivacyBlacklist(); |
412 } | 417 } |
413 | 418 |
414 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { | 419 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { |
415 return profile_->GetUserStyleSheetWatcher(); | 420 return profile_->GetUserStyleSheetWatcher(); |
416 } | 421 } |
417 | 422 |
418 virtual SessionService* GetSessionService() { | 423 virtual SessionService* GetSessionService() { |
419 // Don't save any sessions when off the record. | 424 // Don't save any sessions when off the record. |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 host_content_settings_map_ = new HostContentSettingsMap(this); | 982 host_content_settings_map_ = new HostContentSettingsMap(this); |
978 return host_content_settings_map_.get(); | 983 return host_content_settings_map_.get(); |
979 } | 984 } |
980 | 985 |
981 HostZoomMap* ProfileImpl::GetHostZoomMap() { | 986 HostZoomMap* ProfileImpl::GetHostZoomMap() { |
982 if (!host_zoom_map_) | 987 if (!host_zoom_map_) |
983 host_zoom_map_ = new HostZoomMap(this); | 988 host_zoom_map_ = new HostZoomMap(this); |
984 return host_zoom_map_.get(); | 989 return host_zoom_map_.get(); |
985 } | 990 } |
986 | 991 |
| 992 GeolocationContentSettingsMap* ProfileImpl::GetGeolocationContentSettingsMap() { |
| 993 if (!geolocation_content_settings_map_.get()) |
| 994 geolocation_content_settings_map_ = new GeolocationContentSettingsMap(this); |
| 995 return geolocation_content_settings_map_.get(); |
| 996 } |
| 997 |
987 Blacklist* ProfileImpl::GetPrivacyBlacklist() { | 998 Blacklist* ProfileImpl::GetPrivacyBlacklist() { |
988 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 999 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
989 switches::kEnablePrivacyBlacklists)) | 1000 switches::kEnablePrivacyBlacklists)) |
990 return NULL; | 1001 return NULL; |
991 if (!privacy_blacklist_.get()) | 1002 if (!privacy_blacklist_.get()) |
992 privacy_blacklist_ = new Blacklist(GetPrefs()); | 1003 privacy_blacklist_ = new Blacklist(GetPrefs()); |
993 return privacy_blacklist_.get(); | 1004 return privacy_blacklist_.get(); |
994 } | 1005 } |
995 | 1006 |
996 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { | 1007 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 } | 1354 } |
1344 | 1355 |
1345 void ProfileImpl::InitSyncService() { | 1356 void ProfileImpl::InitSyncService() { |
1346 profile_sync_factory_.reset( | 1357 profile_sync_factory_.reset( |
1347 new ProfileSyncFactoryImpl(this, | 1358 new ProfileSyncFactoryImpl(this, |
1348 CommandLine::ForCurrentProcess())); | 1359 CommandLine::ForCurrentProcess())); |
1349 sync_service_.reset( | 1360 sync_service_.reset( |
1350 profile_sync_factory_->CreateProfileSyncService()); | 1361 profile_sync_factory_->CreateProfileSyncService()); |
1351 sync_service_->Initialize(); | 1362 sync_service_->Initialize(); |
1352 } | 1363 } |
OLD | NEW |