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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 402 } |
402 | 403 |
403 virtual HostContentSettingsMap* GetHostContentSettingsMap() { | 404 virtual HostContentSettingsMap* GetHostContentSettingsMap() { |
404 return profile_->GetHostContentSettingsMap(); | 405 return profile_->GetHostContentSettingsMap(); |
405 } | 406 } |
406 | 407 |
407 virtual HostZoomMap* GetHostZoomMap() { | 408 virtual HostZoomMap* GetHostZoomMap() { |
408 return profile_->GetHostZoomMap(); | 409 return profile_->GetHostZoomMap(); |
409 } | 410 } |
410 | 411 |
| 412 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() { |
| 413 return profile_->GetGeolocationContentSettingsMap(); |
| 414 } |
| 415 |
411 virtual Blacklist* GetPrivacyBlacklist() { | 416 virtual Blacklist* GetPrivacyBlacklist() { |
412 return profile_->GetPrivacyBlacklist(); | 417 return profile_->GetPrivacyBlacklist(); |
413 } | 418 } |
414 | 419 |
415 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { | 420 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { |
416 return profile_->GetUserStyleSheetWatcher(); | 421 return profile_->GetUserStyleSheetWatcher(); |
417 } | 422 } |
418 | 423 |
419 virtual SessionService* GetSessionService() { | 424 virtual SessionService* GetSessionService() { |
420 // Don't save any sessions when off the record. | 425 // Don't save any sessions when off the record. |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 host_content_settings_map_ = new HostContentSettingsMap(this); | 985 host_content_settings_map_ = new HostContentSettingsMap(this); |
981 return host_content_settings_map_.get(); | 986 return host_content_settings_map_.get(); |
982 } | 987 } |
983 | 988 |
984 HostZoomMap* ProfileImpl::GetHostZoomMap() { | 989 HostZoomMap* ProfileImpl::GetHostZoomMap() { |
985 if (!host_zoom_map_) | 990 if (!host_zoom_map_) |
986 host_zoom_map_ = new HostZoomMap(this); | 991 host_zoom_map_ = new HostZoomMap(this); |
987 return host_zoom_map_.get(); | 992 return host_zoom_map_.get(); |
988 } | 993 } |
989 | 994 |
| 995 GeolocationContentSettingsMap* ProfileImpl::GetGeolocationContentSettingsMap() { |
| 996 if (!geolocation_content_settings_map_.get()) |
| 997 geolocation_content_settings_map_ = new GeolocationContentSettingsMap(this); |
| 998 return geolocation_content_settings_map_.get(); |
| 999 } |
| 1000 |
990 Blacklist* ProfileImpl::GetPrivacyBlacklist() { | 1001 Blacklist* ProfileImpl::GetPrivacyBlacklist() { |
991 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 1002 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
992 switches::kEnablePrivacyBlacklists)) | 1003 switches::kEnablePrivacyBlacklists)) |
993 return NULL; | 1004 return NULL; |
994 if (!privacy_blacklist_.get()) | 1005 if (!privacy_blacklist_.get()) |
995 privacy_blacklist_ = new Blacklist(GetPrefs()); | 1006 privacy_blacklist_ = new Blacklist(GetPrefs()); |
996 return privacy_blacklist_.get(); | 1007 return privacy_blacklist_.get(); |
997 } | 1008 } |
998 | 1009 |
999 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { | 1010 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 } | 1357 } |
1347 | 1358 |
1348 void ProfileImpl::InitSyncService() { | 1359 void ProfileImpl::InitSyncService() { |
1349 profile_sync_factory_.reset( | 1360 profile_sync_factory_.reset( |
1350 new ProfileSyncFactoryImpl(this, | 1361 new ProfileSyncFactoryImpl(this, |
1351 CommandLine::ForCurrentProcess())); | 1362 CommandLine::ForCurrentProcess())); |
1352 sync_service_.reset( | 1363 sync_service_.reset( |
1353 profile_sync_factory_->CreateProfileSyncService()); | 1364 profile_sync_factory_->CreateProfileSyncService()); |
1354 sync_service_->Initialize(); | 1365 sync_service_->Initialize(); |
1355 } | 1366 } |
OLD | NEW |