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

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: AllowScript -= cache 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/app/breakpad_mac.h" 9 #include "chrome/app/breakpad_mac.h"
10 #include "chrome/browser/browser_about_handler.h" 10 #include "chrome/browser/browser_about_handler.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/browsing_data_remover.h" 12 #include "chrome/browser/browsing_data_remover.h"
13 #include "chrome/browser/character_encoding.h" 13 #include "chrome/browser/character_encoding.h"
14 #include "chrome/browser/chrome_benchmarking_message_filter.h" 14 #include "chrome/browser/chrome_benchmarking_message_filter.h"
15 #include "chrome/browser/chrome_plugin_message_filter.h" 15 #include "chrome/browser/chrome_plugin_message_filter.h"
16 #include "chrome/browser/chrome_quota_permission_context.h" 16 #include "chrome/browser/chrome_quota_permission_context.h"
17 #include "chrome/browser/chrome_worker_message_filter.h" 17 #include "chrome/browser/chrome_worker_message_filter.h"
18 #include "chrome/browser/content_settings/content_settings_utils.h"
18 #include "chrome/browser/content_settings/cookie_settings.h" 19 #include "chrome/browser/content_settings/cookie_settings.h"
19 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 20 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
20 #include "chrome/browser/download/download_util.h" 21 #include "chrome/browser/download/download_util.h"
21 #include "chrome/browser/extensions/extension_info_map.h" 22 #include "chrome/browser/extensions/extension_info_map.h"
22 #include "chrome/browser/extensions/extension_message_handler.h" 23 #include "chrome/browser/extensions/extension_message_handler.h"
23 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
24 #include "chrome/browser/extensions/extension_web_ui.h" 25 #include "chrome/browser/extensions/extension_web_ui.h"
25 #include "chrome/browser/extensions/extension_webrequest_api.h" 26 #include "chrome/browser/extensions/extension_webrequest_api.h"
26 #include "chrome/browser/geolocation/chrome_access_token_store.h" 27 #include "chrome/browser/geolocation/chrome_access_token_store.h"
27 #include "chrome/browser/google/google_util.h" 28 #include "chrome/browser/google/google_util.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 host->channel()->AddFilter( 311 host->channel()->AddFilter(
311 new SearchProviderInstallStateMessageFilter(id, profile)); 312 new SearchProviderInstallStateMessageFilter(id, profile));
312 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); 313 host->channel()->AddFilter(new SpellCheckMessageFilter(id));
313 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter( 314 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter(
314 id, profile, profile->GetRequestContextForRenderProcess(id))); 315 id, profile, profile->GetRequestContextForRenderProcess(id)));
315 316
316 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 317 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
317 profile->IsOffTheRecord())); 318 profile->IsOffTheRecord()));
318 319
319 SendExtensionWebRequestStatusToHost(host); 320 SendExtensionWebRequestStatusToHost(host);
320 ContentSettingsForOneType settings; 321
321 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); 322 RendererContentSettingRules rules;
322 map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); 323 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules);
323 host->Send(new ChromeViewMsg_SetImageSettingRules(settings)); 324 host->Send(new ChromeViewMsg_SetContentSettingRules(rules));
324 } 325 }
325 326
326 void ChromeContentBrowserClient::PluginProcessHostCreated( 327 void ChromeContentBrowserClient::PluginProcessHostCreated(
327 PluginProcessHost* host) { 328 PluginProcessHost* host) {
328 host->AddFilter(new ChromePluginMessageFilter(host)); 329 host->AddFilter(new ChromePluginMessageFilter(host));
329 } 330 }
330 331
331 void ChromeContentBrowserClient::WorkerProcessHostCreated( 332 void ChromeContentBrowserClient::WorkerProcessHostCreated(
332 WorkerProcessHost* host) { 333 WorkerProcessHost* host) {
333 host->AddFilter(new ChromeWorkerMessageFilter(host)); 334 host->AddFilter(new ChromeWorkerMessageFilter(host));
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 #if defined(USE_NSS) 1062 #if defined(USE_NSS)
1062 crypto::CryptoModuleBlockingPasswordDelegate* 1063 crypto::CryptoModuleBlockingPasswordDelegate*
1063 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1064 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1064 const GURL& url) { 1065 const GURL& url) {
1065 return browser::NewCryptoModuleBlockingDialogDelegate( 1066 return browser::NewCryptoModuleBlockingDialogDelegate(
1066 browser::kCryptoModulePasswordKeygen, url.host()); 1067 browser::kCryptoModulePasswordKeygen, url.host());
1067 } 1068 }
1068 #endif 1069 #endif
1069 1070
1070 } // namespace chrome 1071 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698