| OLD | NEW |
| 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 // The active NavigationEntry is the URL in the URL field of a tab. | 482 // The active NavigationEntry is the URL in the URL field of a tab. |
| 483 // Currently this should be matched by the |primary_pattern|. | 483 // Currently this should be matched by the |primary_pattern|. |
| 484 settings_details.ptr()->primary_pattern().Matches(entry_url)) { | 484 settings_details.ptr()->primary_pattern().Matches(entry_url)) { |
| 485 Profile* profile = | 485 Profile* profile = |
| 486 Profile::FromBrowserContext(tab_contents()->browser_context()); | 486 Profile::FromBrowserContext(tab_contents()->browser_context()); |
| 487 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); | 487 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); |
| 488 Send(new ChromeViewMsg_SetDefaultContentSettings( | 488 Send(new ChromeViewMsg_SetDefaultContentSettings( |
| 489 map->GetDefaultContentSettings())); | 489 map->GetDefaultContentSettings())); |
| 490 Send(new ChromeViewMsg_SetContentSettingsForCurrentURL( | 490 Send(new ChromeViewMsg_SetContentSettingsForCurrentURL( |
| 491 entry_url, map->GetContentSettings(entry_url, entry_url))); | 491 entry_url, map->GetContentSettings(entry_url, entry_url))); |
| 492 ContentSettingsForOneType settings; |
| 493 map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); |
| 494 Send(new ChromeViewMsg_SetImageSettingRules(settings)); |
| 492 } | 495 } |
| 493 } | 496 } |
| 494 | 497 |
| 495 TabSpecificContentSettings::LocalSharedObjectsContainer:: | 498 TabSpecificContentSettings::LocalSharedObjectsContainer:: |
| 496 LocalSharedObjectsContainer(Profile* profile) | 499 LocalSharedObjectsContainer(Profile* profile) |
| 497 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)), | 500 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)), |
| 498 cookies_(new CannedBrowsingDataCookieHelper(profile)), | 501 cookies_(new CannedBrowsingDataCookieHelper(profile)), |
| 499 databases_(new CannedBrowsingDataDatabaseHelper(profile)), | 502 databases_(new CannedBrowsingDataDatabaseHelper(profile)), |
| 500 file_systems_(new CannedBrowsingDataFileSystemHelper(profile)), | 503 file_systems_(new CannedBrowsingDataFileSystemHelper(profile)), |
| 501 indexed_dbs_(new CannedBrowsingDataIndexedDBHelper()), | 504 indexed_dbs_(new CannedBrowsingDataIndexedDBHelper()), |
| (...skipping 20 matching lines...) Expand all Loading... |
| 522 return new CookiesTreeModel(cookies_->Clone(), | 525 return new CookiesTreeModel(cookies_->Clone(), |
| 523 databases_->Clone(), | 526 databases_->Clone(), |
| 524 local_storages_->Clone(), | 527 local_storages_->Clone(), |
| 525 session_storages_->Clone(), | 528 session_storages_->Clone(), |
| 526 appcaches_->Clone(), | 529 appcaches_->Clone(), |
| 527 indexed_dbs_->Clone(), | 530 indexed_dbs_->Clone(), |
| 528 file_systems_->Clone(), | 531 file_systems_->Clone(), |
| 529 NULL, | 532 NULL, |
| 530 true); | 533 true); |
| 531 } | 534 } |
| OLD | NEW |