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

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

Issue 369703002: Remember user decisions on invalid certificates behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed broken include Created 6 years, 4 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: 470 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
471 return setting == CONTENT_SETTING_ASK; 471 return setting == CONTENT_SETTING_ASK;
472 default: 472 default:
473 return false; 473 return false;
474 } 474 }
475 } 475 }
476 476
477 // static 477 // static
478 bool HostContentSettingsMap::ContentTypeHasCompoundValue( 478 bool HostContentSettingsMap::ContentTypeHasCompoundValue(
479 ContentSettingsType type) { 479 ContentSettingsType type) {
480 // Values for content type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE and 480 // Values for content type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
481 // CONTENT_SETTINGS_TYPE_MEDIASTREAM are of type dictionary/map. Compound 481 // CONTENT_SETTINGS_TYPE_MEDIASTREAM, and
482 // types like dictionaries can't be mapped to the type |ContentSetting|. 482 // CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS are of type dictionary/map.
483 // Compound types like dictionaries can't be mapped to the type
484 // |ContentSetting|.
483 #if defined(OS_ANDROID) 485 #if defined(OS_ANDROID)
484 if (type == CONTENT_SETTINGS_TYPE_APP_BANNER) 486 if (type == CONTENT_SETTINGS_TYPE_APP_BANNER)
485 return true; 487 return true;
486 #endif 488 #endif
487 489
488 return (type == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE || 490 return (type == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE ||
489 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM); 491 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM ||
492 type == CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS);
490 } 493 }
491 494
492 void HostContentSettingsMap::OnContentSettingChanged( 495 void HostContentSettingsMap::OnContentSettingChanged(
493 const ContentSettingsPattern& primary_pattern, 496 const ContentSettingsPattern& primary_pattern,
494 const ContentSettingsPattern& secondary_pattern, 497 const ContentSettingsPattern& secondary_pattern,
495 ContentSettingsType content_type, 498 ContentSettingsType content_type,
496 std::string resource_identifier) { 499 std::string resource_identifier) {
497 const ContentSettingsDetails details(primary_pattern, 500 const ContentSettingsDetails details(primary_pattern,
498 secondary_pattern, 501 secondary_pattern,
499 content_type, 502 content_type,
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } 711 }
709 712
710 NOTREACHED(); 713 NOTREACHED();
711 return DEFAULT_PROVIDER; 714 return DEFAULT_PROVIDER;
712 } 715 }
713 716
714 content_settings::PrefProvider* HostContentSettingsMap::GetPrefProvider() { 717 content_settings::PrefProvider* HostContentSettingsMap::GetPrefProvider() {
715 return static_cast<content_settings::PrefProvider*>( 718 return static_cast<content_settings::PrefProvider*>(
716 content_settings_providers_[PREF_PROVIDER]); 719 content_settings_providers_[PREF_PROVIDER]);
717 } 720 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698