Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 7484072: Migrate geolocation settings to host content settings map. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 host_zoom_map_->SetZoomLevel(host, zoom_level); 1045 host_zoom_map_->SetZoomLevel(host, zoom_level);
1043 } 1046 }
1044 } 1047 }
1045 1048
1046 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, 1049 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
1047 Source<HostZoomMap>(host_zoom_map_)); 1050 Source<HostZoomMap>(host_zoom_map_));
1048 } 1051 }
1049 return host_zoom_map_.get(); 1052 return host_zoom_map_.get();
1050 } 1053 }
1051 1054
1052 GeolocationContentSettingsMap* ProfileImpl::GetGeolocationContentSettingsMap() {
1053 if (!geolocation_content_settings_map_.get())
1054 geolocation_content_settings_map_ = new GeolocationContentSettingsMap(this);
1055 return geolocation_content_settings_map_.get();
1056 }
1057
1058 GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() { 1055 GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() {
1059 if (!geolocation_permission_context_.get()) 1056 if (!geolocation_permission_context_.get())
1060 geolocation_permission_context_ = 1057 geolocation_permission_context_ =
1061 new ChromeGeolocationPermissionContext(this); 1058 new ChromeGeolocationPermissionContext(this);
1062 return geolocation_permission_context_.get(); 1059 return geolocation_permission_context_.get();
1063 } 1060 }
1064 1061
1065 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() { 1062 UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() {
1066 if (!user_style_sheet_watcher_.get()) { 1063 if (!user_style_sheet_watcher_.get()) {
1067 user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath()); 1064 user_style_sheet_watcher_ = new UserStyleSheetWatcher(GetPath());
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 new prerender::PrerenderManager( 1759 new prerender::PrerenderManager(
1763 this, g_browser_process->prerender_tracker())); 1760 this, g_browser_process->prerender_tracker()));
1764 #if defined(OS_CHROMEOS) 1761 #if defined(OS_CHROMEOS)
1765 prerender_manager_->AddCondition( 1762 prerender_manager_->AddCondition(
1766 new chromeos::PrerenderConditionNetwork( 1763 new chromeos::PrerenderConditionNetwork(
1767 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); 1764 chromeos::CrosLibrary::Get()->GetNetworkLibrary()));
1768 #endif 1765 #endif
1769 } 1766 }
1770 return prerender_manager_.get(); 1767 return prerender_manager_.get();
1771 } 1768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698