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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed redundant functions Created 5 years, 3 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
OLDNEW
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 #include "chrome/browser/browser_about_handler.h" 27 #include "chrome/browser/browser_about_handler.h"
28 #include "chrome/browser/browser_process.h" 28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/browser_shutdown.h" 29 #include "chrome/browser/browser_shutdown.h"
30 #include "chrome/browser/browsing_data/browsing_data_helper.h" 30 #include "chrome/browser/browsing_data/browsing_data_helper.h"
31 #include "chrome/browser/browsing_data/browsing_data_remover.h" 31 #include "chrome/browser/browsing_data/browsing_data_remover.h"
32 #include "chrome/browser/character_encoding.h" 32 #include "chrome/browser/character_encoding.h"
33 #include "chrome/browser/chrome_content_browser_client_parts.h" 33 #include "chrome/browser/chrome_content_browser_client_parts.h"
34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
35 #include "chrome/browser/chrome_quota_permission_context.h" 35 #include "chrome/browser/chrome_quota_permission_context.h"
36 #include "chrome/browser/content_settings/cookie_settings_factory.h" 36 #include "chrome/browser/content_settings/cookie_settings_factory.h"
37 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 38 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
38 #include "chrome/browser/defaults.h" 39 #include "chrome/browser/defaults.h"
39 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 40 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
40 #include "chrome/browser/download/download_prefs.h" 41 #include "chrome/browser/download/download_prefs.h"
41 #include "chrome/browser/font_family_cache.h" 42 #include "chrome/browser/font_family_cache.h"
42 #include "chrome/browser/geolocation/chrome_access_token_store.h" 43 #include "chrome/browser/geolocation/chrome_access_token_store.h"
43 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 44 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
44 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 45 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
45 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 46 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
46 #include "chrome/browser/net/chrome_net_log.h" 47 #include "chrome/browser/net/chrome_net_log.h"
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 883
883 RendererContentSettingRules rules; 884 RendererContentSettingRules rules;
884 if (host->IsForGuestsOnly()) { 885 if (host->IsForGuestsOnly()) {
885 #if defined(ENABLE_EXTENSIONS) 886 #if defined(ENABLE_EXTENSIONS)
886 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules); 887 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules);
887 #else 888 #else
888 NOTREACHED(); 889 NOTREACHED();
889 #endif 890 #endif
890 } else { 891 } else {
891 GetRendererContentSettingRules( 892 GetRendererContentSettingRules(
892 profile->GetHostContentSettingsMap(), &rules); 893 HostContentSettingsMapFactory::GetForProfile(profile), &rules);
893 } 894 }
894 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); 895 host->Send(new ChromeViewMsg_SetContentSettingRules(rules));
895 } 896 }
896 897
897 GURL ChromeContentBrowserClient::GetEffectiveURL( 898 GURL ChromeContentBrowserClient::GetEffectiveURL(
898 content::BrowserContext* browser_context, const GURL& url) { 899 content::BrowserContext* browser_context, const GURL& url) {
899 Profile* profile = Profile::FromBrowserContext(browser_context); 900 Profile* profile = Profile::FromBrowserContext(browser_context);
900 if (!profile) 901 if (!profile)
901 return url; 902 return url;
902 903
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 } 1933 }
1933 1934
1934 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); 1935 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString());
1935 DCHECK(requesting_url.is_valid()) 1936 DCHECK(requesting_url.is_valid())
1936 << "Invalid URL string: https://" 1937 << "Invalid URL string: https://"
1937 << cert_request_info->host_and_port.ToString(); 1938 << cert_request_info->host_and_port.ToString();
1938 1939
1939 Profile* profile = 1940 Profile* profile =
1940 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 1941 Profile::FromBrowserContext(web_contents->GetBrowserContext());
1941 scoped_ptr<base::Value> filter = 1942 scoped_ptr<base::Value> filter =
1942 profile->GetHostContentSettingsMap()->GetWebsiteSetting( 1943 HostContentSettingsMapFactory::GetForProfile(profile)->GetWebsiteSetting(
1943 requesting_url, 1944 requesting_url,
1944 requesting_url, 1945 requesting_url,
1945 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 1946 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
1946 std::string(), 1947 std::string(),
1947 NULL); 1948 NULL);
1948 1949
1949 if (filter.get()) { 1950 if (filter.get()) {
1950 // Try to automatically select a client certificate. 1951 // Try to automatically select a client certificate.
1951 if (filter->IsType(base::Value::TYPE_DICTIONARY)) { 1952 if (filter->IsType(base::Value::TYPE_DICTIONARY)) {
1952 base::DictionaryValue* filter_dict = 1953 base::DictionaryValue* filter_dict =
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 switches::kDisableWebRtcEncryption, 2645 switches::kDisableWebRtcEncryption,
2645 }; 2646 };
2646 to_command_line->CopySwitchesFrom(from_command_line, 2647 to_command_line->CopySwitchesFrom(from_command_line,
2647 kWebRtcDevSwitchNames, 2648 kWebRtcDevSwitchNames,
2648 arraysize(kWebRtcDevSwitchNames)); 2649 arraysize(kWebRtcDevSwitchNames));
2649 } 2650 }
2650 } 2651 }
2651 #endif // defined(ENABLE_WEBRTC) 2652 #endif // defined(ENABLE_WEBRTC)
2652 2653
2653 } // namespace chrome 2654 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698