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

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

Issue 916073004: Plugin Power Saver: Migrate ASK to BLOCK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/grit/chromium_strings.h" 7 #include "chrome/grit/chromium_strings.h"
8 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // static 162 // static
163 base::string16 WebsiteSettingsUI::PermissionActionToUIString( 163 base::string16 WebsiteSettingsUI::PermissionActionToUIString(
164 ContentSettingsType type, 164 ContentSettingsType type,
165 ContentSetting setting, 165 ContentSetting setting,
166 ContentSetting default_setting, 166 ContentSetting default_setting,
167 content_settings::SettingSource source) { 167 content_settings::SettingSource source) {
168 ContentSetting effective_setting = setting; 168 ContentSetting effective_setting = setting;
169 if (effective_setting == CONTENT_SETTING_DEFAULT) { 169 if (effective_setting == CONTENT_SETTING_DEFAULT) {
170 effective_setting = default_setting; 170 effective_setting = default_setting;
171 171
172 // For Plugins, ASK is obsolete. Show as DETECT to reflect actual behavior. 172 // For Plugins, ASK is obsolete. Show as BLOCK to reflect actual behavior.
173 if (type == CONTENT_SETTINGS_TYPE_PLUGINS && 173 if (type == CONTENT_SETTINGS_TYPE_PLUGINS &&
174 default_setting == CONTENT_SETTING_ASK) { 174 default_setting == CONTENT_SETTING_ASK) {
175 effective_setting = CONTENT_SETTING_DETECT_IMPORTANT_CONTENT; 175 effective_setting = CONTENT_SETTING_BLOCK;
176 } 176 }
177 } 177 }
178 178
179 const int* button_text_ids = NULL; 179 const int* button_text_ids = NULL;
180 switch (source) { 180 switch (source) {
181 case content_settings::SETTING_SOURCE_USER: 181 case content_settings::SETTING_SOURCE_USER:
182 if (setting == CONTENT_SETTING_DEFAULT) 182 if (setting == CONTENT_SETTING_DEFAULT)
183 button_text_ids = kPermissionButtonTextIDDefaultSetting; 183 button_text_ids = kPermissionButtonTextIDDefaultSetting;
184 else 184 else
185 button_text_ids = kPermissionButtonTextIDUserManaged; 185 button_text_ids = kPermissionButtonTextIDUserManaged;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // the first time. 349 // the first time.
350 return IDR_PAGEINFO_INFO; 350 return IDR_PAGEINFO_INFO;
351 } 351 }
352 352
353 // static 353 // static
354 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( 354 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon(
355 const base::string16& first_visit) { 355 const base::string16& first_visit) {
356 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 356 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
357 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit)); 357 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit));
358 } 358 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698