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

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

Issue 8409006: Take script URLs into account when applying script content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. 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/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_about_handler.h" 9 #include "chrome/browser/browser_about_handler.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/browsing_data_remover.h" 11 #include "chrome/browser/browsing_data_remover.h"
12 #include "chrome/browser/character_encoding.h" 12 #include "chrome/browser/character_encoding.h"
13 #include "chrome/browser/chrome_benchmarking_message_filter.h" 13 #include "chrome/browser/chrome_benchmarking_message_filter.h"
14 #include "chrome/browser/chrome_plugin_message_filter.h" 14 #include "chrome/browser/chrome_plugin_message_filter.h"
15 #include "chrome/browser/chrome_quota_permission_context.h" 15 #include "chrome/browser/chrome_quota_permission_context.h"
16 #include "chrome/browser/chrome_worker_message_filter.h" 16 #include "chrome/browser/chrome_worker_message_filter.h"
17 #include "chrome/browser/content_settings/content_settings_utils.h"
17 #include "chrome/browser/content_settings/cookie_settings.h" 18 #include "chrome/browser/content_settings/cookie_settings.h"
18 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
19 #include "chrome/browser/download/download_util.h" 20 #include "chrome/browser/download/download_util.h"
20 #include "chrome/browser/extensions/extension_info_map.h" 21 #include "chrome/browser/extensions/extension_info_map.h"
21 #include "chrome/browser/extensions/extension_message_handler.h" 22 #include "chrome/browser/extensions/extension_message_handler.h"
22 #include "chrome/browser/extensions/extension_service.h" 23 #include "chrome/browser/extensions/extension_service.h"
23 #include "chrome/browser/extensions/extension_web_ui.h" 24 #include "chrome/browser/extensions/extension_web_ui.h"
24 #include "chrome/browser/extensions/extension_webrequest_api.h" 25 #include "chrome/browser/extensions/extension_webrequest_api.h"
25 #include "chrome/browser/geolocation/chrome_access_token_store.h" 26 #include "chrome/browser/geolocation/chrome_access_token_store.h"
26 #include "chrome/browser/google/google_util.h" 27 #include "chrome/browser/google/google_util.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 host->channel()->AddFilter( 284 host->channel()->AddFilter(
284 new SearchProviderInstallStateMessageFilter(id, profile)); 285 new SearchProviderInstallStateMessageFilter(id, profile));
285 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); 286 host->channel()->AddFilter(new SpellCheckMessageFilter(id));
286 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter( 287 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter(
287 id, profile, profile->GetRequestContextForRenderProcess(id))); 288 id, profile, profile->GetRequestContextForRenderProcess(id)));
288 289
289 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 290 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
290 profile->IsOffTheRecord())); 291 profile->IsOffTheRecord()));
291 292
292 SendExtensionWebRequestStatusToHost(host); 293 SendExtensionWebRequestStatusToHost(host);
293 ContentSettingsForOneType settings; 294
294 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); 295 const HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
295 map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); 296 SendContentSettingRules(map, CONTENT_SETTINGS_TYPE_IMAGES, host);
296 host->Send(new ChromeViewMsg_SetImageSettingRules(settings)); 297 SendContentSettingRules(map, CONTENT_SETTINGS_TYPE_JAVASCRIPT, host);
297 } 298 }
298 299
299 void ChromeContentBrowserClient::PluginProcessHostCreated( 300 void ChromeContentBrowserClient::PluginProcessHostCreated(
300 PluginProcessHost* host) { 301 PluginProcessHost* host) {
301 host->AddFilter(new ChromePluginMessageFilter(host)); 302 host->AddFilter(new ChromePluginMessageFilter(host));
302 } 303 }
303 304
304 void ChromeContentBrowserClient::WorkerProcessHostCreated( 305 void ChromeContentBrowserClient::WorkerProcessHostCreated(
305 WorkerProcessHost* host) { 306 WorkerProcessHost* host) {
306 host->AddFilter(new ChromeWorkerMessageFilter(host)); 307 host->AddFilter(new ChromeWorkerMessageFilter(host));
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 #if defined(USE_NSS) 989 #if defined(USE_NSS)
989 crypto::CryptoModuleBlockingPasswordDelegate* 990 crypto::CryptoModuleBlockingPasswordDelegate*
990 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 991 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
991 const GURL& url) { 992 const GURL& url) {
992 return browser::NewCryptoModuleBlockingDialogDelegate( 993 return browser::NewCryptoModuleBlockingDialogDelegate(
993 browser::kCryptoModulePasswordKeygen, url.host()); 994 browser::kCryptoModulePasswordKeygen, url.host());
994 } 995 }
995 #endif 996 #endif
996 997
997 } // namespace chrome 998 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698