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

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

Issue 566863005: Expose the Website Settings page in the Content Setting page if it is enabled via flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handler strings are handled elsewhere. Created 6 years, 3 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 continue; 194 continue;
195 ContentSetting default_setting = 195 ContentSetting default_setting =
196 GetDefaultContentSettingFromProvider(content_type, provider->second); 196 GetDefaultContentSettingFromProvider(content_type, provider->second);
197 if (default_setting != CONTENT_SETTING_DEFAULT) { 197 if (default_setting != CONTENT_SETTING_DEFAULT) {
198 if (provider_id) 198 if (provider_id)
199 *provider_id = kProviderNames[provider->first]; 199 *provider_id = kProviderNames[provider->first];
200 return default_setting; 200 return default_setting;
201 } 201 }
202 } 202 }
203 203
204 // The method GetDefaultContentSetting always has to return an explicit
205 // value that is to be used as default. We here rely on the
206 // DefaultProvider to always provide a value.
207 NOTREACHED();
208 return CONTENT_SETTING_DEFAULT; 204 return CONTENT_SETTING_DEFAULT;
209 } 205 }
210 206
211 ContentSetting HostContentSettingsMap::GetContentSetting( 207 ContentSetting HostContentSettingsMap::GetContentSetting(
212 const GURL& primary_url, 208 const GURL& primary_url,
213 const GURL& secondary_url, 209 const GURL& secondary_url,
214 ContentSettingsType content_type, 210 ContentSettingsType content_type,
215 const std::string& resource_identifier) const { 211 const std::string& resource_identifier) const {
216 DCHECK(!ContentTypeHasCompoundValue(content_type)); 212 DCHECK(!ContentTypeHasCompoundValue(content_type));
217 scoped_ptr<base::Value> value(GetWebsiteSetting( 213 scoped_ptr<base::Value> value(GetWebsiteSetting(
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 } 748 }
753 749
754 NOTREACHED(); 750 NOTREACHED();
755 return DEFAULT_PROVIDER; 751 return DEFAULT_PROVIDER;
756 } 752 }
757 753
758 content_settings::PrefProvider* HostContentSettingsMap::GetPrefProvider() { 754 content_settings::PrefProvider* HostContentSettingsMap::GetPrefProvider() {
759 return static_cast<content_settings::PrefProvider*>( 755 return static_cast<content_settings::PrefProvider*>(
760 content_settings_providers_[PREF_PROVIDER]); 756 content_settings_providers_[PREF_PROVIDER]);
761 } 757 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/content_settings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698