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

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

Issue 8510008: Don't whitelist extensions for geolocation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 content_settings::ValueToContentSetting(rule.value.get()), 382 content_settings::ValueToContentSetting(rule.value.get()),
383 kProviderNames[provider_type], 383 kProviderNames[provider_type],
384 incognito)); 384 incognito));
385 } 385 }
386 } 386 }
387 387
388 bool HostContentSettingsMap::ShouldAllowAllContent( 388 bool HostContentSettingsMap::ShouldAllowAllContent(
389 const GURL& primary_url, 389 const GURL& primary_url,
390 const GURL& secondary_url, 390 const GURL& secondary_url,
391 ContentSettingsType content_type) { 391 ContentSettingsType content_type) {
392 if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) 392 if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS ||
393 content_type == CONTENT_SETTINGS_TYPE_GEOLOCATION) {
393 return false; 394 return false;
395 }
394 if (primary_url.SchemeIs(chrome::kExtensionScheme)) { 396 if (primary_url.SchemeIs(chrome::kExtensionScheme)) {
395 return content_type != CONTENT_SETTINGS_TYPE_COOKIES || 397 return content_type != CONTENT_SETTINGS_TYPE_COOKIES ||
396 secondary_url.SchemeIs(chrome::kExtensionScheme); 398 secondary_url.SchemeIs(chrome::kExtensionScheme);
397 } 399 }
398 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) || 400 return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) ||
399 primary_url.SchemeIs(chrome::kChromeInternalScheme) || 401 primary_url.SchemeIs(chrome::kChromeInternalScheme) ||
400 primary_url.SchemeIs(chrome::kChromeUIScheme); 402 primary_url.SchemeIs(chrome::kChromeUIScheme);
401 } 403 }
402 404
403 base::Value* HostContentSettingsMap::GetWebsiteSetting( 405 base::Value* HostContentSettingsMap::GetWebsiteSetting(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 444 }
443 } 445 }
444 446
445 if (info) { 447 if (info) {
446 info->source = content_settings::SETTING_SOURCE_NONE; 448 info->source = content_settings::SETTING_SOURCE_NONE;
447 info->primary_pattern = ContentSettingsPattern(); 449 info->primary_pattern = ContentSettingsPattern();
448 info->secondary_pattern = ContentSettingsPattern(); 450 info->secondary_pattern = ContentSettingsPattern();
449 } 451 }
450 return NULL; 452 return NULL;
451 } 453 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698