| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/permissions/permission_queue_controller.h" | 5 #include "chrome/browser/permissions/permission_queue_controller.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 9 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" | 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
| 11 #include "chrome/browser/media/midi_permission_infobar_delegate.h" | 12 #include "chrome/browser/media/midi_permission_infobar_delegate.h" |
| 12 #include "chrome/browser/notifications/notification_permission_infobar_delegate.
h" | 13 #include "chrome/browser/notifications/notification_permission_infobar_delegate.
h" |
| 13 #include "chrome/browser/permissions/permission_context_uma_util.h" | 14 #include "chrome/browser/permissions/permission_context_uma_util.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/storage/durable_storage_permission_infobar_delegate.h" | 16 #include "chrome/browser/storage/durable_storage_permission_infobar_delegate.h" |
| 16 #include "chrome/browser/tab_contents/tab_util.h" | 17 #include "chrome/browser/tab_contents/tab_util.h" |
| 17 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 18 #include "components/content_settings/core/browser/host_content_settings_map.h" | 19 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 391 } |
| 391 | 392 |
| 392 ContentSetting content_setting = | 393 ContentSetting content_setting = |
| 393 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; | 394 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; |
| 394 | 395 |
| 395 ContentSettingsPattern embedder_pattern = | 396 ContentSettingsPattern embedder_pattern = |
| 396 (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) ? | 397 (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) ? |
| 397 ContentSettingsPattern::Wildcard() : | 398 ContentSettingsPattern::Wildcard() : |
| 398 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); | 399 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); |
| 399 | 400 |
| 400 profile_->GetHostContentSettingsMap()->SetContentSetting( | 401 HostContentSettingsMapFactory::GetForProfile(profile_)->SetContentSetting( |
| 401 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), | 402 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), |
| 402 embedder_pattern, | 403 embedder_pattern, |
| 403 type_, | 404 type_, |
| 404 std::string(), | 405 std::string(), |
| 405 content_setting); | 406 content_setting); |
| 406 } | 407 } |
| OLD | NEW |