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

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

Issue 9521013: Remove web intents from Chrome on Android build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude 'browser/intents' from Android build as well. Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/prefs/browser_prefs.cc » ('j') | chrome/browser/ui/browser.cc » ('J')
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 bool HostContentSettingsMap::IsValueAllowedForType( 316 bool HostContentSettingsMap::IsValueAllowedForType(
317 const base::Value* value, ContentSettingsType type) { 317 const base::Value* value, ContentSettingsType type) {
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 !web_intents::IsWebIntentsEnabled()) 327 #if !defined(OS_ANDROID)
328 if (!web_intents::IsWebIntentsEnabled()) {
James Hawkins 2012/03/08 05:21:22 nit: No braces here.
Jesse Greenwald 2012/03/08 18:35:28 Done.
329 return false;
330 }
331 #else
328 return false; 332 return false;
333 #endif
334 }
329 335
330 // BLOCK semantics are not implemented for fullscreen. 336 // BLOCK semantics are not implemented for fullscreen.
331 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && 337 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN &&
332 setting == CONTENT_SETTING_BLOCK) { 338 setting == CONTENT_SETTING_BLOCK) {
333 return false; 339 return false;
334 } 340 }
335 341
336 // DEFAULT, ALLOW and BLOCK are always allowed. 342 // DEFAULT, ALLOW and BLOCK are always allowed.
337 if (setting == CONTENT_SETTING_DEFAULT || 343 if (setting == CONTENT_SETTING_DEFAULT ||
338 setting == CONTENT_SETTING_ALLOW || 344 setting == CONTENT_SETTING_ALLOW ||
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } 472 }
467 } 473 }
468 474
469 if (info) { 475 if (info) {
470 info->source = content_settings::SETTING_SOURCE_NONE; 476 info->source = content_settings::SETTING_SOURCE_NONE;
471 info->primary_pattern = ContentSettingsPattern(); 477 info->primary_pattern = ContentSettingsPattern();
472 info->secondary_pattern = ContentSettingsPattern(); 478 info->secondary_pattern = ContentSettingsPattern();
473 } 479 }
474 return NULL; 480 return NULL;
475 } 481 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/browser_prefs.cc » ('j') | chrome/browser/ui/browser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698