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

Side by Side Diff: chrome/browser/content_setting_image_model.cc

Issue 3299020: Remove vestigial cookie/web app permissions prompting UI now that the async U... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_setting_image_model.h" 5 #include "chrome/browser/content_setting_image_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/host_content_settings_map.h" 9 #include "chrome/browser/host_content_settings_map.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const int* icon_ids; 85 const int* icon_ids;
86 const int* tooltip_ids; 86 const int* tooltip_ids;
87 87
88 if (!content_settings) { 88 if (!content_settings) {
89 set_visible(false); 89 set_visible(false);
90 return; 90 return;
91 } 91 }
92 if (content_settings->IsContentBlocked(get_content_settings_type())) { 92 if (content_settings->IsContentBlocked(get_content_settings_type())) {
93 icon_ids = kBlockedIconIDs; 93 icon_ids = kBlockedIconIDs;
94 tooltip_ids = kBlockedTooltipIDs; 94 tooltip_ids = kBlockedTooltipIDs;
95 } else if (!CommandLine::ForCurrentProcess()->HasSwitch( 95 } else if (tab_contents->profile()->GetHostContentSettingsMap()->
96 switches::kEnableCookiePrompt) &&
97 tab_contents->profile()->GetHostContentSettingsMap()->
98 GetDefaultContentSetting(get_content_settings_type()) == 96 GetDefaultContentSetting(get_content_settings_type()) ==
99 CONTENT_SETTING_BLOCK && 97 CONTENT_SETTING_BLOCK &&
100 content_settings->IsContentAccessed(get_content_settings_type())) { 98 content_settings->IsContentAccessed(get_content_settings_type())) {
101 // If a content type is blocked by default and was accessed, display the 99 // If a content type is blocked by default and was accessed, display the
102 // accessed icon. 100 // accessed icon.
103 icon_ids = kAccessedIconIDs; 101 icon_ids = kAccessedIconIDs;
104 tooltip_ids = kAccessedTooltipIDs; 102 tooltip_ids = kAccessedTooltipIDs;
105 } else { 103 } else {
106 set_visible(false); 104 set_visible(false);
107 return; 105 return;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // static 162 // static
165 ContentSettingImageModel* 163 ContentSettingImageModel*
166 ContentSettingImageModel::CreateContentSettingImageModel( 164 ContentSettingImageModel::CreateContentSettingImageModel(
167 ContentSettingsType content_settings_type) { 165 ContentSettingsType content_settings_type) {
168 if (content_settings_type == CONTENT_SETTINGS_TYPE_GEOLOCATION) 166 if (content_settings_type == CONTENT_SETTINGS_TYPE_GEOLOCATION)
169 return new ContentSettingGeolocationImageModel(); 167 return new ContentSettingGeolocationImageModel();
170 if (content_settings_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) 168 if (content_settings_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
171 return new ContentSettingNotificationsImageModel(); 169 return new ContentSettingNotificationsImageModel();
172 return new ContentSettingBlockedImageModel(content_settings_type); 170 return new ContentSettingBlockedImageModel(content_settings_type);
173 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698