Chromium Code Reviews| 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/content_settings/permission_queue_controller.h" | 5 #include "chrome/browser/content_settings/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.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/content_settings/permission_context_uma_util.h" | 10 #include "chrome/browser/content_settings/permission_context_uma_util.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 bool allowed) { | 362 bool allowed) { |
| 363 if (requesting_frame.GetOrigin().SchemeIsFile()) { | 363 if (requesting_frame.GetOrigin().SchemeIsFile()) { |
| 364 // Chrome can be launched with --disable-web-security which allows | 364 // Chrome can be launched with --disable-web-security which allows |
| 365 // geolocation requests from file:// URLs. We don't want to store these | 365 // geolocation requests from file:// URLs. We don't want to store these |
| 366 // in the host content settings map. | 366 // in the host content settings map. |
| 367 return; | 367 return; |
| 368 } | 368 } |
| 369 | 369 |
| 370 ContentSetting content_setting = | 370 ContentSetting content_setting = |
| 371 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; | 371 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; |
| 372 | |
| 373 if (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { | |
|
Peter Beverloo
2014/09/23 15:58:47
Can you file a bug about removing this (and other)
Miguel Garcia
2014/09/23 16:53:38
Done. (crbug.com/416894)
| |
| 374 profile_->GetHostContentSettingsMap()->SetContentSetting( | |
| 375 ContentSettingsPattern::FromURLNoWildcard( | |
|
Peter Beverloo
2014/09/23 15:58:46
nit: indent with four spaces.
Miguel Garcia
2014/09/23 16:53:38
Done.
| |
| 376 requesting_frame.GetOrigin()), | |
| 377 ContentSettingsPattern::Wildcard(), | |
|
Bernhard Bauer
2014/09/23 16:13:02
This is the only difference to the call below, rig
Miguel Garcia
2014/09/23 16:53:38
Done.
| |
| 378 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | |
| 379 std::string(), | |
| 380 content_setting); | |
| 381 return; | |
| 382 } | |
| 383 | |
| 372 profile_->GetHostContentSettingsMap()->SetContentSetting( | 384 profile_->GetHostContentSettingsMap()->SetContentSetting( |
| 373 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), | 385 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), |
| 374 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()), | 386 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()), |
| 375 type_, | 387 type_, |
| 376 std::string(), | 388 std::string(), |
| 377 content_setting); | 389 content_setting); |
| 378 } | 390 } |
| OLD | NEW |