OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <list> |
| 8 #include <utility> |
| 9 #include <vector> |
| 10 |
7 #include "base/command_line.h" | 11 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 13 #include "base/environment.h" |
10 #include "base/file_path.h" | 14 #include "base/file_path.h" |
11 #include "base/file_util.h" | 15 #include "base/file_util.h" |
12 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
13 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
14 #include "base/path_service.h" | 18 #include "base/path_service.h" |
15 #include "base/string_number_conversions.h" | 19 #include "base/string_number_conversions.h" |
16 #include "base/string_util.h" | 20 #include "base/string_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
32 #include "chrome/browser/extensions/extension_event_router.h" | 36 #include "chrome/browser/extensions/extension_event_router.h" |
33 #include "chrome/browser/extensions/extension_info_map.h" | 37 #include "chrome/browser/extensions/extension_info_map.h" |
34 #include "chrome/browser/extensions/extension_message_service.h" | 38 #include "chrome/browser/extensions/extension_message_service.h" |
35 #include "chrome/browser/extensions/extension_pref_store.h" | 39 #include "chrome/browser/extensions/extension_pref_store.h" |
36 #include "chrome/browser/extensions/extension_process_manager.h" | 40 #include "chrome/browser/extensions/extension_process_manager.h" |
37 #include "chrome/browser/extensions/extension_service.h" | 41 #include "chrome/browser/extensions/extension_service.h" |
38 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 42 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
39 #include "chrome/browser/extensions/user_script_master.h" | 43 #include "chrome/browser/extensions/user_script_master.h" |
40 #include "chrome/browser/favicon/favicon_service.h" | 44 #include "chrome/browser/favicon/favicon_service.h" |
41 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 45 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
42 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | |
43 #include "chrome/browser/history/history.h" | 46 #include "chrome/browser/history/history.h" |
44 #include "chrome/browser/history/shortcuts_backend.h" | 47 #include "chrome/browser/history/shortcuts_backend.h" |
45 #include "chrome/browser/history/top_sites.h" | 48 #include "chrome/browser/history/top_sites.h" |
46 #include "chrome/browser/instant/instant_controller.h" | 49 #include "chrome/browser/instant/instant_controller.h" |
47 #include "chrome/browser/metrics/metrics_service.h" | 50 #include "chrome/browser/metrics/metrics_service.h" |
48 #include "chrome/browser/net/chrome_url_request_context.h" | 51 #include "chrome/browser/net/chrome_url_request_context.h" |
49 #include "chrome/browser/net/gaia/token_service.h" | 52 #include "chrome/browser/net/gaia/token_service.h" |
50 #include "chrome/browser/net/net_pref_observer.h" | 53 #include "chrome/browser/net/net_pref_observer.h" |
51 #include "chrome/browser/net/pref_proxy_config_service.h" | 54 #include "chrome/browser/net/pref_proxy_config_service.h" |
52 #include "chrome/browser/net/ssl_config_service_manager.h" | 55 #include "chrome/browser/net/ssl_config_service_manager.h" |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 host_zoom_map_->SetZoomLevel(host, zoom_level); | 1030 host_zoom_map_->SetZoomLevel(host, zoom_level); |
1028 } | 1031 } |
1029 } | 1032 } |
1030 | 1033 |
1031 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, | 1034 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
1032 Source<HostZoomMap>(host_zoom_map_)); | 1035 Source<HostZoomMap>(host_zoom_map_)); |
1033 } | 1036 } |
1034 return host_zoom_map_.get(); | 1037 return host_zoom_map_.get(); |
1035 } | 1038 } |
1036 | 1039 |
1037 GeolocationContentSettingsMap* ProfileImpl::GetGeolocationContentSettingsMap() { | |
1038 if (!geolocation_content_settings_map_.get()) | |
1039 geolocation_content_settings_map_ = new GeolocationContentSettingsMap(this); | |
1040 return geolocation_content_settings_map_.get(); | |
1041 } | |
1042 | |
1043 GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() { | 1040 GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() { |
1044 if (!geolocation_permission_context_.get()) | 1041 if (!geolocation_permission_context_.get()) |
1045 geolocation_permission_context_ = | 1042 geolocation_permission_context_ = |
1046 new ChromeGeolocationPermissionContext(this); | 1043 new ChromeGeolocationPermissionContext(this); |
1047 return geolocation_permission_context_.get(); | 1044 return geolocation_permission_context_.get(); |
1048 } | 1045 } |
1049 | 1046 |
1050 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { | 1047 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { |
1051 if (!user_style_sheet_watcher_.get()) { | 1048 if (!user_style_sheet_watcher_.get()) { |
1052 user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath()); | 1049 user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath()); |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 #endif | 1712 #endif |
1716 } | 1713 } |
1717 return prerender_manager_.get(); | 1714 return prerender_manager_.get(); |
1718 } | 1715 } |
1719 | 1716 |
1720 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { | 1717 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { |
1721 if (!spellcheck_profile_.get()) | 1718 if (!spellcheck_profile_.get()) |
1722 spellcheck_profile_.reset(new SpellCheckProfile()); | 1719 spellcheck_profile_.reset(new SpellCheckProfile()); |
1723 return spellcheck_profile_.get(); | 1720 return spellcheck_profile_.get(); |
1724 } | 1721 } |
OLD | NEW |