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

Side by Side Diff: components/content_settings/core/common/content_settings.cc

Issue 884373002: Update content setting for app banners to store more information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac test failure Created 5 years, 10 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
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 "components/content_settings/core/common/content_settings.h" 5 #include "components/content_settings/core/common/content_settings.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 ContentSetting IntToContentSetting(int content_setting) { 9 ContentSetting IntToContentSetting(int content_setting) {
10 return ((content_setting < 0) || 10 return ((content_setting < 0) ||
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return CONTENT_SETTINGS_TYPE_HISTOGRAM_PUSH_MESSAGING; 57 return CONTENT_SETTINGS_TYPE_HISTOGRAM_PUSH_MESSAGING;
58 case CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS: 58 case CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS:
59 return CONTENT_SETTINGS_TYPE_HISTOGRAM_SSL_CERT_DECISIONS; 59 return CONTENT_SETTINGS_TYPE_HISTOGRAM_SSL_CERT_DECISIONS;
60 #if defined(OS_WIN) 60 #if defined(OS_WIN)
61 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP: 61 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP:
62 return CONTENT_SETTINGS_TYPE_HISTOGRAM_METRO_SWITCH_TO_DESKTOP; 62 return CONTENT_SETTINGS_TYPE_HISTOGRAM_METRO_SWITCH_TO_DESKTOP;
63 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS) 63 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS)
64 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: 64 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER:
65 return CONTENT_SETTINGS_TYPE_HISTOGRAM_PROTECTED_MEDIA_IDENTIFIER; 65 return CONTENT_SETTINGS_TYPE_HISTOGRAM_PROTECTED_MEDIA_IDENTIFIER;
66 #endif 66 #endif
67 #if defined(OS_ANDROID)
68 case CONTENT_SETTINGS_TYPE_APP_BANNER: 67 case CONTENT_SETTINGS_TYPE_APP_BANNER:
69 return CONTENT_SETTINGS_TYPE_HISTOGRAM_APP_BANNER; 68 return CONTENT_SETTINGS_TYPE_HISTOGRAM_APP_BANNER;
70 #endif
71 case CONTENT_SETTINGS_NUM_TYPES: 69 case CONTENT_SETTINGS_NUM_TYPES:
72 return CONTENT_SETTINGS_TYPE_HISTOGRAM_INVALID; 70 return CONTENT_SETTINGS_TYPE_HISTOGRAM_INVALID;
73 } 71 }
74 NOTREACHED(); 72 NOTREACHED();
75 return CONTENT_SETTINGS_TYPE_HISTOGRAM_INVALID; 73 return CONTENT_SETTINGS_TYPE_HISTOGRAM_INVALID;
76 } 74 }
77 75
78 ContentSettingPatternSource::ContentSettingPatternSource( 76 ContentSettingPatternSource::ContentSettingPatternSource(
79 const ContentSettingsPattern& primary_pattern, 77 const ContentSettingsPattern& primary_pattern,
80 const ContentSettingsPattern& secondary_pattern, 78 const ContentSettingsPattern& secondary_pattern,
81 ContentSetting setting, 79 ContentSetting setting,
82 const std::string& source, 80 const std::string& source,
83 bool incognito) 81 bool incognito)
84 : primary_pattern(primary_pattern), 82 : primary_pattern(primary_pattern),
85 secondary_pattern(secondary_pattern), 83 secondary_pattern(secondary_pattern),
86 setting(setting), 84 setting(setting),
87 source(source), 85 source(source),
88 incognito(incognito) {} 86 incognito(incognito) {}
89 87
90 ContentSettingPatternSource::ContentSettingPatternSource() 88 ContentSettingPatternSource::ContentSettingPatternSource()
91 : setting(CONTENT_SETTING_DEFAULT), incognito(false) { 89 : setting(CONTENT_SETTING_DEFAULT), incognito(false) {
92 } 90 }
93 91
94 RendererContentSettingRules::RendererContentSettingRules() {} 92 RendererContentSettingRules::RendererContentSettingRules() {}
95 93
96 RendererContentSettingRules::~RendererContentSettingRules() {} 94 RendererContentSettingRules::~RendererContentSettingRules() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698