| OLD | NEW |
| 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/plugins/plugins_field_trial.h" |
| 8 #include "chrome/grit/chromium_strings.h" | 9 #include "chrome/grit/chromium_strings.h" |
| 9 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| 10 #include "components/content_settings/core/browser/plugins_field_trial.h" | |
| 11 #include "components/strings/grit/components_strings.h" | 11 #include "components/strings/grit/components_strings.h" |
| 12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
| 13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
| 14 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 15 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 const int kInvalidResourceID = -1; | 19 const int kInvalidResourceID = -1; |
| 20 | 20 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 ContentSettingsType type, | 219 ContentSettingsType type, |
| 220 ContentSetting setting, | 220 ContentSetting setting, |
| 221 ContentSetting default_setting, | 221 ContentSetting default_setting, |
| 222 content_settings::SettingSource source) { | 222 content_settings::SettingSource source) { |
| 223 ContentSetting effective_setting = setting; | 223 ContentSetting effective_setting = setting; |
| 224 if (effective_setting == CONTENT_SETTING_DEFAULT) | 224 if (effective_setting == CONTENT_SETTING_DEFAULT) |
| 225 effective_setting = default_setting; | 225 effective_setting = default_setting; |
| 226 | 226 |
| 227 #if defined(ENABLE_PLUGINS) | 227 #if defined(ENABLE_PLUGINS) |
| 228 effective_setting = | 228 effective_setting = |
| 229 content_settings::PluginsFieldTrial::EffectiveContentSetting( | 229 PluginsFieldTrial::EffectiveContentSetting(type, effective_setting); |
| 230 type, effective_setting); | |
| 231 #endif | 230 #endif |
| 232 | 231 |
| 233 const int* button_text_ids = NULL; | 232 const int* button_text_ids = NULL; |
| 234 switch (source) { | 233 switch (source) { |
| 235 case content_settings::SETTING_SOURCE_USER: | 234 case content_settings::SETTING_SOURCE_USER: |
| 236 if (setting == CONTENT_SETTING_DEFAULT) | 235 if (setting == CONTENT_SETTING_DEFAULT) |
| 237 button_text_ids = kPermissionButtonTextIDDefaultSetting; | 236 button_text_ids = kPermissionButtonTextIDDefaultSetting; |
| 238 else | 237 else |
| 239 button_text_ids = kPermissionButtonTextIDUserManaged; | 238 button_text_ids = kPermissionButtonTextIDUserManaged; |
| 240 break; | 239 break; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 364 } |
| 366 return resource_id; | 365 return resource_id; |
| 367 } | 366 } |
| 368 | 367 |
| 369 // static | 368 // static |
| 370 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( | 369 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( |
| 371 WebsiteSettings::SiteConnectionStatus status) { | 370 WebsiteSettings::SiteConnectionStatus status) { |
| 372 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 371 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 373 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 372 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 374 } | 373 } |
| OLD | NEW |