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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. Created 9 years, 2 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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // The active NavigationEntry is the URL in the URL field of a tab. 481 // The active NavigationEntry is the URL in the URL field of a tab.
482 // Currently this should be matched by the |primary_pattern|. 482 // Currently this should be matched by the |primary_pattern|.
483 settings_details.ptr()->primary_pattern().Matches(entry_url)) { 483 settings_details.ptr()->primary_pattern().Matches(entry_url)) {
484 Profile* profile = 484 Profile* profile =
485 Profile::FromBrowserContext(tab_contents()->browser_context()); 485 Profile::FromBrowserContext(tab_contents()->browser_context());
486 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); 486 HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
487 Send(new ChromeViewMsg_SetDefaultContentSettings( 487 Send(new ChromeViewMsg_SetDefaultContentSettings(
488 map->GetDefaultContentSettings())); 488 map->GetDefaultContentSettings()));
489 Send(new ChromeViewMsg_SetContentSettingsForCurrentURL( 489 Send(new ChromeViewMsg_SetContentSettingsForCurrentURL(
490 entry_url, map->GetContentSettings(entry_url, entry_url))); 490 entry_url, map->GetContentSettings(entry_url, entry_url)));
491 ContentSettingsForOneType settings;
492 map->GetSettingsForOneType(
493 CONTENT_SETTINGS_TYPE_IMAGES, "",
494 &settings);
495 settings.push_back(ContentSettingPatternSourceTuple(
496 ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
497 map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_IMAGES), "",
498 false));
499 Send(new ChromeViewMsg_SetImageSettingRules(settings));
491 } 500 }
492 } 501 }
493 502
494 TabSpecificContentSettings::LocalSharedObjectsContainer:: 503 TabSpecificContentSettings::LocalSharedObjectsContainer::
495 LocalSharedObjectsContainer(Profile* profile) 504 LocalSharedObjectsContainer(Profile* profile)
496 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)), 505 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)),
497 cookies_(new CannedBrowsingDataCookieHelper(profile)), 506 cookies_(new CannedBrowsingDataCookieHelper(profile)),
498 databases_(new CannedBrowsingDataDatabaseHelper(profile)), 507 databases_(new CannedBrowsingDataDatabaseHelper(profile)),
499 file_systems_(new CannedBrowsingDataFileSystemHelper(profile)), 508 file_systems_(new CannedBrowsingDataFileSystemHelper(profile)),
500 indexed_dbs_(new CannedBrowsingDataIndexedDBHelper()), 509 indexed_dbs_(new CannedBrowsingDataIndexedDBHelper()),
(...skipping 20 matching lines...) Expand all
521 return new CookiesTreeModel(cookies_->Clone(), 530 return new CookiesTreeModel(cookies_->Clone(),
522 databases_->Clone(), 531 databases_->Clone(),
523 local_storages_->Clone(), 532 local_storages_->Clone(),
524 session_storages_->Clone(), 533 session_storages_->Clone(),
525 appcaches_->Clone(), 534 appcaches_->Clone(),
526 indexed_dbs_->Clone(), 535 indexed_dbs_->Clone(),
527 file_systems_->Clone(), 536 file_systems_->Clone(),
528 NULL, 537 NULL,
529 true); 538 true);
530 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698