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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: | 557 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
558 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: | 558 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
559 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: | 559 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
560 return false; | 560 return false; |
561 case CONTENT_SETTINGS_TYPE_COOKIES: | 561 case CONTENT_SETTINGS_TYPE_COOKIES: |
562 return secondary_url.SchemeIs(extensions::kExtensionScheme); | 562 return secondary_url.SchemeIs(extensions::kExtensionScheme); |
563 default: | 563 default: |
564 return true; | 564 return true; |
565 } | 565 } |
566 } | 566 } |
567 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || | 567 return primary_url.SchemeIs(content::kChromeDevToolsScheme) || |
568 primary_url.SchemeIs(content::kChromeUIScheme); | 568 primary_url.SchemeIs(content::kChromeUIScheme); |
569 } | 569 } |
570 | 570 |
571 base::Value* HostContentSettingsMap::GetWebsiteSetting( | 571 base::Value* HostContentSettingsMap::GetWebsiteSetting( |
572 const GURL& primary_url, | 572 const GURL& primary_url, |
573 const GURL& secondary_url, | 573 const GURL& secondary_url, |
574 ContentSettingsType content_type, | 574 ContentSettingsType content_type, |
575 const std::string& resource_identifier, | 575 const std::string& resource_identifier, |
576 content_settings::SettingInfo* info) const { | 576 content_settings::SettingInfo* info) const { |
577 DCHECK(SupportsResourceIdentifier(content_type) || | 577 DCHECK(SupportsResourceIdentifier(content_type) || |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 HostContentSettingsMap::GetProviderTypeFromSource( | 623 HostContentSettingsMap::GetProviderTypeFromSource( |
624 const std::string& source) { | 624 const std::string& source) { |
625 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { | 625 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { |
626 if (source == kProviderNames[i]) | 626 if (source == kProviderNames[i]) |
627 return static_cast<ProviderType>(i); | 627 return static_cast<ProviderType>(i); |
628 } | 628 } |
629 | 629 |
630 NOTREACHED(); | 630 NOTREACHED(); |
631 return DEFAULT_PROVIDER; | 631 return DEFAULT_PROVIDER; |
632 } | 632 } |
OLD | NEW |