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

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

Issue 10134026: Remove browser from web intents UI code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Browser test compilation Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/intents/register_intent_handler_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return IsSettingAllowedForType( 318 return IsSettingAllowedForType(
319 content_settings::ValueToContentSetting(value), type); 319 content_settings::ValueToContentSetting(value), type);
320 } 320 }
321 321
322 // static 322 // static
323 bool HostContentSettingsMap::IsSettingAllowedForType( 323 bool HostContentSettingsMap::IsSettingAllowedForType(
324 ContentSetting setting, ContentSettingsType content_type) { 324 ContentSetting setting, ContentSettingsType content_type) {
325 // Intents content settings are hidden behind a switch for now. 325 // Intents content settings are hidden behind a switch for now.
326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { 326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) {
327 #if defined(ENABLE_WEB_INTENTS) 327 #if defined(ENABLE_WEB_INTENTS)
328 if (!web_intents::IsWebIntentsEnabled()) 328 if (!web_intents::IsWebIntentsEnabledInActiveBrowser())
329 return false; 329 return false;
330 #else 330 #else
331 return false; 331 return false;
332 #endif 332 #endif
333 } 333 }
334 334
335 // BLOCK semantics are not implemented for fullscreen. 335 // BLOCK semantics are not implemented for fullscreen.
336 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && 336 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN &&
337 setting == CONTENT_SETTING_BLOCK) { 337 setting == CONTENT_SETTING_BLOCK) {
338 return false; 338 return false;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 } 472 }
473 473
474 if (info) { 474 if (info) {
475 info->source = content_settings::SETTING_SOURCE_NONE; 475 info->source = content_settings::SETTING_SOURCE_NONE;
476 info->primary_pattern = ContentSettingsPattern(); 476 info->primary_pattern = ContentSettingsPattern();
477 info->secondary_pattern = ContentSettingsPattern(); 477 info->secondary_pattern = ContentSettingsPattern();
478 } 478 }
479 return NULL; 479 return NULL;
480 } 480 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/intents/register_intent_handler_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698