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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.cc

Issue 2731083002: Stop pretending that a Flash setting of DETECT_IMPORTANT_CONTENT is ASK.
Patch Set: Created 3 years, 9 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) 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/ui/website_settings/website_settings_ui.h" 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
9 #include "chrome/browser/plugins/plugin_utils.h" 9 #include "chrome/browser/plugins/plugin_utils.h"
10 #include "chrome/browser/plugins/plugins_field_trial.h" 10 #include "chrome/browser/plugins/plugins_field_trial.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 content_settings::SettingSource source) { 241 content_settings::SettingSource source) {
242 ContentSetting effective_setting = setting; 242 ContentSetting effective_setting = setting;
243 if (effective_setting == CONTENT_SETTING_DEFAULT) 243 if (effective_setting == CONTENT_SETTING_DEFAULT)
244 effective_setting = default_setting; 244 effective_setting = default_setting;
245 245
246 #if BUILDFLAG(ENABLE_PLUGINS) 246 #if BUILDFLAG(ENABLE_PLUGINS)
247 HostContentSettingsMap* host_content_settings_map = 247 HostContentSettingsMap* host_content_settings_map =
248 HostContentSettingsMapFactory::GetForProfile(profile); 248 HostContentSettingsMapFactory::GetForProfile(profile);
249 effective_setting = PluginsFieldTrial::EffectiveContentSetting( 249 effective_setting = PluginsFieldTrial::EffectiveContentSetting(
250 host_content_settings_map, type, effective_setting); 250 host_content_settings_map, type, effective_setting);
251
252 // Display the UI string for ASK instead of DETECT for HTML5 by Default.
253 // TODO(tommycli): Once HTML5 by Default is shipped and the feature flag
254 // is removed, just migrate the actual content setting to ASK.
255 if (PluginUtils::ShouldPreferHtmlOverPlugins(host_content_settings_map) &&
256 effective_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT) {
257 effective_setting = CONTENT_SETTING_ASK;
258 }
259 #endif 251 #endif
260 252
261 const int* button_text_ids = NULL; 253 const int* button_text_ids = NULL;
262 switch (source) { 254 switch (source) {
263 case content_settings::SETTING_SOURCE_USER: 255 case content_settings::SETTING_SOURCE_USER:
264 if (setting == CONTENT_SETTING_DEFAULT) 256 if (setting == CONTENT_SETTING_DEFAULT)
265 button_text_ids = kPermissionButtonTextIDDefaultSetting; 257 button_text_ids = kPermissionButtonTextIDDefaultSetting;
266 else 258 else
267 button_text_ids = kPermissionButtonTextIDUserManaged; 259 button_text_ids = kPermissionButtonTextIDUserManaged;
268 break; 260 break;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 379 }
388 return resource_id; 380 return resource_id;
389 } 381 }
390 382
391 // static 383 // static
392 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( 384 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon(
393 WebsiteSettings::SiteConnectionStatus status) { 385 WebsiteSettings::SiteConnectionStatus status) {
394 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 386 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
395 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 387 return rb.GetNativeImageNamed(GetConnectionIconID(status));
396 } 388 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698