Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement as data source instead. Also rebased across thousands of CLs. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: 547 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
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::kDomDistillerScheme) ||
nasko 2014/01/16 23:39:12 I'm not sure if we need to exempt the scheme from
nyquist 2014/01/22 00:47:58 Removed.
557 primary_url.SchemeIs(chrome::kChromeUIScheme); 558 primary_url.SchemeIs(chrome::kChromeUIScheme);
558 } 559 }
559 560
560 base::Value* HostContentSettingsMap::GetWebsiteSetting( 561 base::Value* HostContentSettingsMap::GetWebsiteSetting(
561 const GURL& primary_url, 562 const GURL& primary_url,
562 const GURL& secondary_url, 563 const GURL& secondary_url,
563 ContentSettingsType content_type, 564 ContentSettingsType content_type,
564 const std::string& resource_identifier, 565 const std::string& resource_identifier,
565 content_settings::SettingInfo* info) const { 566 content_settings::SettingInfo* info) const {
566 DCHECK(SupportsResourceIdentifier(content_type) || 567 DCHECK(SupportsResourceIdentifier(content_type) ||
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 HostContentSettingsMap::GetProviderTypeFromSource( 613 HostContentSettingsMap::GetProviderTypeFromSource(
613 const std::string& source) { 614 const std::string& source) {
614 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { 615 for (size_t i = 0; i < arraysize(kProviderNames); ++i) {
615 if (source == kProviderNames[i]) 616 if (source == kProviderNames[i])
616 return static_cast<ProviderType>(i); 617 return static_cast<ProviderType>(i);
617 } 618 }
618 619
619 NOTREACHED(); 620 NOTREACHED();
620 return DEFAULT_PROVIDER; 621 return DEFAULT_PROVIDER;
621 } 622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698