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

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

Issue 1084123002: Make DETECT_IMPORTANT_CONTENT the default Plugins content setting based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn fixes Created 5 years, 8 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 "chrome/browser/plugins/plugins_field_trial.h"
8 #include "chrome/grit/chromium_strings.h" 7 #include "chrome/grit/chromium_strings.h"
9 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
9 #include "components/content_settings/core/browser/plugins_field_trial.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/gfx/image/image.h" 13 #include "ui/gfx/image/image.h"
14 14
15 namespace { 15 namespace {
16 16
17 const int kInvalidResourceID = -1; 17 const int kInvalidResourceID = -1;
18 18
19 // The resource IDs for the strings that are displayed on the permissions 19 // The resource IDs for the strings that are displayed on the permissions
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ContentSettingsType type, 175 ContentSettingsType type,
176 ContentSetting setting, 176 ContentSetting setting,
177 ContentSetting default_setting, 177 ContentSetting default_setting,
178 content_settings::SettingSource source) { 178 content_settings::SettingSource source) {
179 ContentSetting effective_setting = setting; 179 ContentSetting effective_setting = setting;
180 if (effective_setting == CONTENT_SETTING_DEFAULT) 180 if (effective_setting == CONTENT_SETTING_DEFAULT)
181 effective_setting = default_setting; 181 effective_setting = default_setting;
182 182
183 #if defined(ENABLE_PLUGINS) 183 #if defined(ENABLE_PLUGINS)
184 effective_setting = 184 effective_setting =
185 PluginsFieldTrial::EffectiveContentSetting(type, effective_setting); 185 content_settings::PluginsFieldTrial::EffectiveContentSetting(
186 type, effective_setting);
186 #endif 187 #endif
187 188
188 const int* button_text_ids = NULL; 189 const int* button_text_ids = NULL;
189 switch (source) { 190 switch (source) {
190 case content_settings::SETTING_SOURCE_USER: 191 case content_settings::SETTING_SOURCE_USER:
191 if (setting == CONTENT_SETTING_DEFAULT) 192 if (setting == CONTENT_SETTING_DEFAULT)
192 button_text_ids = kPermissionButtonTextIDDefaultSetting; 193 button_text_ids = kPermissionButtonTextIDDefaultSetting;
193 else 194 else
194 button_text_ids = kPermissionButtonTextIDUserManaged; 195 button_text_ids = kPermissionButtonTextIDUserManaged;
195 break; 196 break;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // the first time. 359 // the first time.
359 return IDR_PAGEINFO_INFO; 360 return IDR_PAGEINFO_INFO;
360 } 361 }
361 362
362 // static 363 // static
363 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( 364 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon(
364 const base::string16& first_visit) { 365 const base::string16& first_visit) {
365 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 366 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
366 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit)); 367 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit));
367 } 368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698