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