diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 08:27:52 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 08:27:52 +0000 |
commit | 64ec3d13abf89f523f5d834a3dddb76e115bdf88 (patch) | |
tree | 80ca491a9e61ff35ad2edbda8bace09dd98c5681 /chrome/browser/content_setting_bubble_model.cc | |
parent | 5699b94105b6a97b528837f5ae5278deeb461b84 (diff) | |
download | chromium_src-64ec3d13abf89f523f5d834a3dddb76e115bdf88.zip chromium_src-64ec3d13abf89f523f5d834a3dddb76e115bdf88.tar.gz chromium_src-64ec3d13abf89f523f5d834a3dddb76e115bdf88.tar.bz2 |
Revert 55536 - Reland r55382. When blocking cookies, also show an icon in the location bar when cookies are accessed.
If the user choses to block cookies per default, this will grant access to the collected cookies dialog as soon as the page accesses cookies. Right now, the icon is only shown if cookies were actually blocked.
BUG=45230
TEST=Canned*.*:ContentSettingImage*.*:TabSpecific*.*
Review URL: http://codereview.chromium.org/3014056
Review URL: http://codereview.chromium.org/3146003
TBR=jochen@chromium.org
Review URL: http://codereview.chromium.org/3127002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_bubble_model.cc')
-rw-r--r-- | chrome/browser/content_setting_bubble_model.cc | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc index 8f83f02..6c1c13b 100644 --- a/chrome/browser/content_setting_bubble_model.cc +++ b/chrome/browser/content_setting_bubble_model.cc @@ -14,7 +14,6 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/browser/tab_contents/tab_specific_content_settings.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" @@ -34,7 +33,7 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { private: void SetTitle() { - static const int kBlockedTitleIDs[] = { + static const int kTitleIDs[] = { IDS_BLOCKED_COOKIES_TITLE, IDS_BLOCKED_IMAGES_TITLE, IDS_BLOCKED_JAVASCRIPT_TITLE, @@ -43,30 +42,10 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { 0, // Geolocation does not have an overall title. 0, // Notifications do not have a bubble. }; - static const int kAccessedTitleIDs[] = { - IDS_ACCESSED_COOKIES_TITLE, - 0, - 0, - 0, - 0, - 0, - 0, - }; - COMPILE_ASSERT(arraysize(kAccessedTitleIDs) == CONTENT_SETTINGS_NUM_TYPES, - Need_a_setting_for_every_content_settings_type); - COMPILE_ASSERT(arraysize(kBlockedTitleIDs) == CONTENT_SETTINGS_NUM_TYPES, + COMPILE_ASSERT(arraysize(kTitleIDs) == CONTENT_SETTINGS_NUM_TYPES, Need_a_setting_for_every_content_settings_type); - const int *title_ids = kBlockedTitleIDs; - if (tab_contents() && - tab_contents()->GetTabSpecificContentSettings()->IsContentAccessed( - content_type()) && - !tab_contents()->GetTabSpecificContentSettings()->IsContentBlocked( - content_type()) && - !CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableCookiePrompt)) - title_ids = kAccessedTitleIDs; - if (title_ids[content_type()]) - set_title(l10n_util::GetStringUTF8(title_ids[content_type()])); + if (kTitleIDs[content_type()]) + set_title(l10n_util::GetStringUTF8(kTitleIDs[content_type()])); } void SetManageLink() { |