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

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

Issue 2264583003: [HBD] Map ASK to DETECT_IMPORTANT_CONTENT when PreferHtmlOverPlugins is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove content_settings namespace Created 4 years, 4 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/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
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(
Lei Zhang 2016/08/22 17:57:54 Fits on previous line? Just git cl format?
trizzofo 2016/08/22 18:09:36 Done.
230 type, effective_setting); 230 type, effective_setting);
231 #endif 231 #endif
232 232
233 const int* button_text_ids = NULL; 233 const int* button_text_ids = NULL;
234 switch (source) { 234 switch (source) {
235 case content_settings::SETTING_SOURCE_USER: 235 case content_settings::SETTING_SOURCE_USER:
236 if (setting == CONTENT_SETTING_DEFAULT) 236 if (setting == CONTENT_SETTING_DEFAULT)
237 button_text_ids = kPermissionButtonTextIDDefaultSetting; 237 button_text_ids = kPermissionButtonTextIDDefaultSetting;
238 else 238 else
239 button_text_ids = kPermissionButtonTextIDUserManaged; 239 button_text_ids = kPermissionButtonTextIDUserManaged;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 return resource_id; 366 return resource_id;
367 } 367 }
368 368
369 // static 369 // static
370 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( 370 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon(
371 WebsiteSettings::SiteConnectionStatus status) { 371 WebsiteSettings::SiteConnectionStatus status) {
372 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 372 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
373 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 373 return rb.GetNativeImageNamed(GetConnectionIconID(status));
374 } 374 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698