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

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

Issue 10577028: Move the mixed scripting infobar to a page action icon / content setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bool HostContentSettingsMap::IsSettingAllowedForType( 336 bool HostContentSettingsMap::IsSettingAllowedForType(
337 PrefService* prefs, 337 PrefService* prefs,
338 ContentSetting setting, 338 ContentSetting setting,
339 ContentSettingsType content_type) { 339 ContentSettingsType content_type) {
340 // Intents content settings are hidden behind a switch for now. 340 // Intents content settings are hidden behind a switch for now.
341 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { 341 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) {
342 if (!web_intents::IsWebIntentsEnabled(prefs)) 342 if (!web_intents::IsWebIntentsEnabled(prefs))
343 return false; 343 return false;
344 } 344 }
345 345
346 // We don't yet support stored content settings for mixed scripting.
347 if (content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)
348 return false;
349
346 // BLOCK semantics are not implemented for fullscreen. 350 // BLOCK semantics are not implemented for fullscreen.
347 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && 351 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN &&
348 setting == CONTENT_SETTING_BLOCK) { 352 setting == CONTENT_SETTING_BLOCK) {
349 return false; 353 return false;
350 } 354 }
351 355
352 // DEFAULT, ALLOW and BLOCK are always allowed. 356 // DEFAULT, ALLOW and BLOCK are always allowed.
353 if (setting == CONTENT_SETTING_DEFAULT || 357 if (setting == CONTENT_SETTING_DEFAULT ||
354 setting == CONTENT_SETTING_ALLOW || 358 setting == CONTENT_SETTING_ALLOW ||
355 setting == CONTENT_SETTING_BLOCK) { 359 setting == CONTENT_SETTING_BLOCK) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 536 }
533 } 537 }
534 538
535 if (info) { 539 if (info) {
536 info->source = content_settings::SETTING_SOURCE_NONE; 540 info->source = content_settings::SETTING_SOURCE_NONE;
537 info->primary_pattern = ContentSettingsPattern(); 541 info->primary_pattern = ContentSettingsPattern();
538 info->secondary_pattern = ContentSettingsPattern(); 542 info->secondary_pattern = ContentSettingsPattern();
539 } 543 }
540 return NULL; 544 return NULL;
541 } 545 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698