OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
338 case CONTENT_SETTINGS_TYPE_INTENTS: | 338 case CONTENT_SETTINGS_TYPE_INTENTS: |
339 case CONTENT_SETTINGS_TYPE_MOUSELOCK: | 339 case CONTENT_SETTINGS_TYPE_MOUSELOCK: |
340 return setting == CONTENT_SETTING_ASK; | 340 return setting == CONTENT_SETTING_ASK; |
341 default: | 341 default: |
342 return false; | 342 return false; |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 void HostContentSettingsMap::OnContentSettingChanged( | 346 void HostContentSettingsMap::OnContentSettingChanged( |
347 ContentSettingsPattern primary_pattern, | 347 const ContentSettingsPattern& primary_pattern, |
348 ContentSettingsPattern secondary_pattern, | 348 const ContentSettingsPattern& secondary_pattern, |
349 ContentSettingsType content_type, | 349 ContentSettingsType content_type, |
350 std::string resource_identifier) { | 350 std::string resource_identifier) { |
351 const ContentSettingsDetails details(primary_pattern, | 351 const ContentSettingsDetails details(primary_pattern, |
352 secondary_pattern, | 352 secondary_pattern, |
353 content_type, | 353 content_type, |
354 resource_identifier); | 354 resource_identifier); |
355 content::NotificationService::current()->Notify( | 355 content::NotificationService::current()->Notify( |
356 chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, | 356 chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, |
357 content::Source<HostContentSettingsMap>(this), | 357 content::Source<HostContentSettingsMap>(this), |
358 content::Details<const ContentSettingsDetails>(&details)); | 358 content::Details<const ContentSettingsDetails>(&details)); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 455 } |
456 } | 456 } |
457 | 457 |
458 if (info) { | 458 if (info) { |
459 info->source = content_settings::SETTING_SOURCE_NONE; | 459 info->source = content_settings::SETTING_SOURCE_NONE; |
460 info->primary_pattern = ContentSettingsPattern(); | 460 info->primary_pattern = ContentSettingsPattern(); |
461 info->secondary_pattern = ContentSettingsPattern(); | 461 info->secondary_pattern = ContentSettingsPattern(); |
462 } | 462 } |
463 return NULL; | 463 return NULL; |
464 } | 464 } |
OLD | NEW |