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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: | 548 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
549 return false; | 549 return false; |
550 case CONTENT_SETTINGS_TYPE_COOKIES: | 550 case CONTENT_SETTINGS_TYPE_COOKIES: |
551 return secondary_url.SchemeIs(extensions::kExtensionScheme); | 551 return secondary_url.SchemeIs(extensions::kExtensionScheme); |
552 default: | 552 default: |
553 return true; | 553 return true; |
554 } | 554 } |
555 } | 555 } |
556 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || | 556 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || |
557 primary_url.SchemeIs(chrome::kChromeInternalScheme) || | 557 primary_url.SchemeIs(chrome::kChromeInternalScheme) || |
558 primary_url.SchemeIs(chrome::kChromeUIScheme); | 558 primary_url.SchemeIs(chrome::kChromeUIScheme) || |
| 559 primary_url.SchemeIs(chrome::kDomDistillerScheme); |
559 } | 560 } |
560 | 561 |
561 base::Value* HostContentSettingsMap::GetWebsiteSetting( | 562 base::Value* HostContentSettingsMap::GetWebsiteSetting( |
562 const GURL& primary_url, | 563 const GURL& primary_url, |
563 const GURL& secondary_url, | 564 const GURL& secondary_url, |
564 ContentSettingsType content_type, | 565 ContentSettingsType content_type, |
565 const std::string& resource_identifier, | 566 const std::string& resource_identifier, |
566 content_settings::SettingInfo* info) const { | 567 content_settings::SettingInfo* info) const { |
567 DCHECK(SupportsResourceIdentifier(content_type) || | 568 DCHECK(SupportsResourceIdentifier(content_type) || |
568 resource_identifier.empty()); | 569 resource_identifier.empty()); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 HostContentSettingsMap::GetProviderTypeFromSource( | 614 HostContentSettingsMap::GetProviderTypeFromSource( |
614 const std::string& source) { | 615 const std::string& source) { |
615 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { | 616 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { |
616 if (source == kProviderNames[i]) | 617 if (source == kProviderNames[i]) |
617 return static_cast<ProviderType>(i); | 618 return static_cast<ProviderType>(i); |
618 } | 619 } |
619 | 620 |
620 NOTREACHED(); | 621 NOTREACHED(); |
621 return DEFAULT_PROVIDER; | 622 return DEFAULT_PROVIDER; |
622 } | 623 } |
OLD | NEW |