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

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

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 return true; 374 return true;
375 } 375 }
376 switch (content_type) { 376 switch (content_type) {
377 case CONTENT_SETTINGS_TYPE_COOKIES: 377 case CONTENT_SETTINGS_TYPE_COOKIES:
378 return setting == CONTENT_SETTING_SESSION_ONLY; 378 return setting == CONTENT_SETTING_SESSION_ONLY;
379 case CONTENT_SETTINGS_TYPE_PLUGINS: 379 case CONTENT_SETTINGS_TYPE_PLUGINS:
380 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 380 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
381 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 381 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
382 case CONTENT_SETTINGS_TYPE_INTENTS: 382 case CONTENT_SETTINGS_TYPE_INTENTS:
383 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 383 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
384 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
384 return setting == CONTENT_SETTING_ASK; 385 return setting == CONTENT_SETTING_ASK;
385 default: 386 default:
386 return false; 387 return false;
387 } 388 }
388 } 389 }
389 390
390 void HostContentSettingsMap::OnContentSettingChanged( 391 void HostContentSettingsMap::OnContentSettingChanged(
391 const ContentSettingsPattern& primary_pattern, 392 const ContentSettingsPattern& primary_pattern,
392 const ContentSettingsPattern& secondary_pattern, 393 const ContentSettingsPattern& secondary_pattern,
393 ContentSettingsType content_type, 394 ContentSettingsType content_type,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 551 }
551 } 552 }
552 553
553 if (info) { 554 if (info) {
554 info->source = content_settings::SETTING_SOURCE_NONE; 555 info->source = content_settings::SETTING_SOURCE_NONE;
555 info->primary_pattern = ContentSettingsPattern(); 556 info->primary_pattern = ContentSettingsPattern();
556 info->secondary_pattern = ContentSettingsPattern(); 557 info->secondary_pattern = ContentSettingsPattern();
557 } 558 }
558 return NULL; 559 return NULL;
559 } 560 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698