| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui/collected_cookies_ui_delegate.h" | 5 #include "chrome/browser/ui/webui/collected_cookies_ui_delegate.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 } // namespace | 130 } // namespace |
| 131 | 131 |
| 132 // static | 132 // static |
| 133 void CollectedCookiesUIDelegate::Show(TabContentsWrapper* wrapper) { | 133 void CollectedCookiesUIDelegate::Show(TabContentsWrapper* wrapper) { |
| 134 CollectedCookiesUIDelegate* delegate = | 134 CollectedCookiesUIDelegate* delegate = |
| 135 new CollectedCookiesUIDelegate(wrapper); | 135 new CollectedCookiesUIDelegate(wrapper); |
| 136 Profile* profile = wrapper->profile(); | 136 Profile* profile = wrapper->profile(); |
| 137 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile, | 137 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile, |
| 138 delegate, | 138 delegate, |
| 139 wrapper->tab_contents()); | 139 wrapper); |
| 140 } | 140 } |
| 141 | 141 |
| 142 CollectedCookiesUIDelegate::CollectedCookiesUIDelegate( | 142 CollectedCookiesUIDelegate::CollectedCookiesUIDelegate( |
| 143 TabContentsWrapper* wrapper) | 143 TabContentsWrapper* wrapper) |
| 144 : wrapper_(wrapper), | 144 : wrapper_(wrapper), |
| 145 closed_(false) { | 145 closed_(false) { |
| 146 TabSpecificContentSettings* content_settings = wrapper->content_settings(); | 146 TabSpecificContentSettings* content_settings = wrapper->content_settings(); |
| 147 HostContentSettingsMap* host_content_settings_map = | 147 HostContentSettingsMap* host_content_settings_map = |
| 148 wrapper->profile()->GetHostContentSettingsMap(); | 148 wrapper->profile()->GetHostContentSettingsMap(); |
| 149 | 149 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 if (!args->GetString(0, &node_path)) | 279 if (!args->GetString(0, &node_path)) |
| 280 return; | 280 return; |
| 281 | 281 |
| 282 CookieTreeOriginNode* origin_node = GetOriginNode( | 282 CookieTreeOriginNode* origin_node = GetOriginNode( |
| 283 blocked_cookies_tree_model_.get(), node_path); | 283 blocked_cookies_tree_model_.get(), node_path); |
| 284 if (!origin_node) | 284 if (!origin_node) |
| 285 return; | 285 return; |
| 286 | 286 |
| 287 AddContentException(origin_node, CONTENT_SETTING_SESSION_ONLY); | 287 AddContentException(origin_node, CONTENT_SETTING_SESSION_ONLY); |
| 288 } | 288 } |
| OLD | NEW |