| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/content_setting_bubble_model.h" | 5 #include "chrome/browser/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/browser/blocked_popup_container.h" | 9 #include "chrome/browser/blocked_popup_container.h" |
| 10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 class ContentSettingTitleLinkAndInfoModel | 71 class ContentSettingTitleLinkAndInfoModel |
| 72 : public ContentSettingTitleAndLinkModel { | 72 : public ContentSettingTitleAndLinkModel { |
| 73 public: | 73 public: |
| 74 ContentSettingTitleLinkAndInfoModel(TabContents* tab_contents, | 74 ContentSettingTitleLinkAndInfoModel(TabContents* tab_contents, |
| 75 Profile* profile, | 75 Profile* profile, |
| 76 ContentSettingsType content_type) | 76 ContentSettingsType content_type) |
| 77 : ContentSettingTitleAndLinkModel(tab_contents, profile, content_type) { | 77 : ContentSettingTitleAndLinkModel(tab_contents, profile, content_type) { |
| 78 if (CommandLine::ForCurrentProcess()->HasSwitch( | 78 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 79 switches::kDisableCookiePrompt)) | 79 switches::kEnableCookiePrompt)) |
| 80 SetInfoLink(); | 80 SetInfoLink(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 void SetInfoLink() { | 84 void SetInfoLink() { |
| 85 static const int kInfoIDs[] = { | 85 static const int kInfoIDs[] = { |
| 86 IDS_BLOCKED_COOKIES_INFO, | 86 IDS_BLOCKED_COOKIES_INFO, |
| 87 0, // Images do not have an info link. | 87 0, // Images do not have an info link. |
| 88 0, // Javascript doesn't have an info link. | 88 0, // Javascript doesn't have an info link. |
| 89 0, // Plugins do not have an info link. | 89 0, // Plugins do not have an info link. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 ContentSettingBubbleModel::~ContentSettingBubbleModel() { | 320 ContentSettingBubbleModel::~ContentSettingBubbleModel() { |
| 321 } | 321 } |
| 322 | 322 |
| 323 void ContentSettingBubbleModel::Observe(NotificationType type, | 323 void ContentSettingBubbleModel::Observe(NotificationType type, |
| 324 const NotificationSource& source, | 324 const NotificationSource& source, |
| 325 const NotificationDetails& details) { | 325 const NotificationDetails& details) { |
| 326 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); | 326 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); |
| 327 DCHECK(source == Source<TabContents>(tab_contents_)); | 327 DCHECK(source == Source<TabContents>(tab_contents_)); |
| 328 tab_contents_ = NULL; | 328 tab_contents_ = NULL; |
| 329 } | 329 } |
| OLD | NEW |