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

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

Issue 8538004: Take script URLs into account when applying script content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_default_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "chrome/app/breakpad_mac.h" 12 #include "chrome/app/breakpad_mac.h"
13 #include "chrome/browser/browser_about_handler.h" 13 #include "chrome/browser/browser_about_handler.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/browsing_data_remover.h" 15 #include "chrome/browser/browsing_data_remover.h"
16 #include "chrome/browser/character_encoding.h" 16 #include "chrome/browser/character_encoding.h"
17 #include "chrome/browser/chrome_benchmarking_message_filter.h" 17 #include "chrome/browser/chrome_benchmarking_message_filter.h"
18 #include "chrome/browser/chrome_plugin_message_filter.h" 18 #include "chrome/browser/chrome_plugin_message_filter.h"
19 #include "chrome/browser/chrome_quota_permission_context.h" 19 #include "chrome/browser/chrome_quota_permission_context.h"
20 #include "chrome/browser/content_settings/content_settings_utils.h"
20 #include "chrome/browser/content_settings/cookie_settings.h" 21 #include "chrome/browser/content_settings/cookie_settings.h"
21 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 22 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
22 #include "chrome/browser/download/download_util.h" 23 #include "chrome/browser/download/download_util.h"
23 #include "chrome/browser/extensions/extension_info_map.h" 24 #include "chrome/browser/extensions/extension_info_map.h"
24 #include "chrome/browser/extensions/extension_message_handler.h" 25 #include "chrome/browser/extensions/extension_message_handler.h"
25 #include "chrome/browser/extensions/extension_service.h" 26 #include "chrome/browser/extensions/extension_service.h"
26 #include "chrome/browser/extensions/extension_web_ui.h" 27 #include "chrome/browser/extensions/extension_web_ui.h"
27 #include "chrome/browser/extensions/extension_webrequest_api.h" 28 #include "chrome/browser/extensions/extension_webrequest_api.h"
28 #include "chrome/browser/geolocation/chrome_access_token_store.h" 29 #include "chrome/browser/geolocation/chrome_access_token_store.h"
29 #include "chrome/browser/google/google_util.h" 30 #include "chrome/browser/google/google_util.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 host->channel()->AddFilter( 314 host->channel()->AddFilter(
314 new SearchProviderInstallStateMessageFilter(id, profile)); 315 new SearchProviderInstallStateMessageFilter(id, profile));
315 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); 316 host->channel()->AddFilter(new SpellCheckMessageFilter(id));
316 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter( 317 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter(
317 id, profile, profile->GetRequestContextForRenderProcess(id))); 318 id, profile, profile->GetRequestContextForRenderProcess(id)));
318 319
319 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 320 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
320 profile->IsOffTheRecord())); 321 profile->IsOffTheRecord()));
321 322
322 SendExtensionWebRequestStatusToHost(host); 323 SendExtensionWebRequestStatusToHost(host);
323 ContentSettingsForOneType settings; 324
324 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); 325 RendererContentSettingRules rules;
325 map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); 326 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules);
326 host->Send(new ChromeViewMsg_SetImageSettingRules(settings)); 327 host->Send(new ChromeViewMsg_SetContentSettingRules(rules));
327 } 328 }
328 329
329 void ChromeContentBrowserClient::PluginProcessHostCreated( 330 void ChromeContentBrowserClient::PluginProcessHostCreated(
330 PluginProcessHost* host) { 331 PluginProcessHost* host) {
331 host->AddFilter(new ChromePluginMessageFilter(host)); 332 host->AddFilter(new ChromePluginMessageFilter(host));
332 } 333 }
333 334
334 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() { 335 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() {
335 return ChromeWebUIFactory::GetInstance(); 336 return ChromeWebUIFactory::GetInstance();
336 } 337 }
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 #if defined(USE_NSS) 1116 #if defined(USE_NSS)
1116 crypto::CryptoModuleBlockingPasswordDelegate* 1117 crypto::CryptoModuleBlockingPasswordDelegate*
1117 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1118 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1118 const GURL& url) { 1119 const GURL& url) {
1119 return browser::NewCryptoModuleBlockingDialogDelegate( 1120 return browser::NewCryptoModuleBlockingDialogDelegate(
1120 browser::kCryptoModulePasswordKeygen, url.host()); 1121 browser::kCryptoModulePasswordKeygen, url.host());
1121 } 1122 }
1122 #endif 1123 #endif
1123 1124
1124 } // namespace chrome 1125 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_default_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698