| 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/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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 content_settings::ValueToContentSetting(rule.value.get()), | 382 content_settings::ValueToContentSetting(rule.value.get()), |
| 383 kProviderNames[provider_type], | 383 kProviderNames[provider_type], |
| 384 incognito)); | 384 incognito)); |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 bool HostContentSettingsMap::ShouldAllowAllContent( | 388 bool HostContentSettingsMap::ShouldAllowAllContent( |
| 389 const GURL& primary_url, | 389 const GURL& primary_url, |
| 390 const GURL& secondary_url, | 390 const GURL& secondary_url, |
| 391 ContentSettingsType content_type) { | 391 ContentSettingsType content_type) { |
| 392 if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) | 392 if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS || |
| 393 content_type == CONTENT_SETTINGS_TYPE_GEOLOCATION) { |
| 393 return false; | 394 return false; |
| 395 } |
| 394 if (primary_url.SchemeIs(chrome::kExtensionScheme)) { | 396 if (primary_url.SchemeIs(chrome::kExtensionScheme)) { |
| 395 return content_type != CONTENT_SETTINGS_TYPE_COOKIES || | 397 return content_type != CONTENT_SETTINGS_TYPE_COOKIES || |
| 396 secondary_url.SchemeIs(chrome::kExtensionScheme); | 398 secondary_url.SchemeIs(chrome::kExtensionScheme); |
| 397 } | 399 } |
| 398 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || | 400 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| 399 primary_url.SchemeIs(chrome::kChromeInternalScheme) || | 401 primary_url.SchemeIs(chrome::kChromeInternalScheme) || |
| 400 primary_url.SchemeIs(chrome::kChromeUIScheme); | 402 primary_url.SchemeIs(chrome::kChromeUIScheme); |
| 401 } | 403 } |
| 402 | 404 |
| 403 base::Value* HostContentSettingsMap::GetWebsiteSetting( | 405 base::Value* HostContentSettingsMap::GetWebsiteSetting( |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 444 } |
| 443 } | 445 } |
| 444 | 446 |
| 445 if (info) { | 447 if (info) { |
| 446 info->source = content_settings::SETTING_SOURCE_NONE; | 448 info->source = content_settings::SETTING_SOURCE_NONE; |
| 447 info->primary_pattern = ContentSettingsPattern(); | 449 info->primary_pattern = ContentSettingsPattern(); |
| 448 info->secondary_pattern = ContentSettingsPattern(); | 450 info->secondary_pattern = ContentSettingsPattern(); |
| 449 } | 451 } |
| 450 return NULL; | 452 return NULL; |
| 451 } | 453 } |
| OLD | NEW |