| 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/cookie_modal_dialog.h" | 5 #include "chrome/browser/cookie_modal_dialog.h" |
| 6 | 6 |
| 7 #include "app/message_box_flags.h" | 7 #include "app/message_box_flags.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/host_content_settings_map.h" | 9 #include "chrome/browser/host_content_settings_map.h" |
| 10 #include "chrome/browser/pref_service.h" | 10 #include "chrome/browser/pref_service.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK); | 130 CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK); |
| 131 } | 131 } |
| 132 | 132 |
| 133 if (delegate_) { | 133 if (delegate_) { |
| 134 delegate_->BlockSiteData(); | 134 delegate_->BlockSiteData(); |
| 135 delegate_ = NULL; // It can be deleted at any point now. | 135 delegate_ = NULL; // It can be deleted at any point now. |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 // static | 139 // static |
| 140 void CookiePromptModalDialog::RegisterPrefs(PrefService* prefs) { | 140 void CookiePromptModalDialog::RegisterUserPrefs(PrefService* prefs) { |
| 141 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); | 141 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); |
| 142 } | 142 } |
| 143 | 143 |
| 144 int CookiePromptModalDialog::GetDialogButtons() { | 144 int CookiePromptModalDialog::GetDialogButtons() { |
| 145 // Enable the automation interface to accept/dismiss this dialog. | 145 // Enable the automation interface to accept/dismiss this dialog. |
| 146 return MessageBoxFlags::DIALOGBUTTON_OK | | 146 return MessageBoxFlags::DIALOGBUTTON_OK | |
| 147 MessageBoxFlags::DIALOGBUTTON_CANCEL; | 147 MessageBoxFlags::DIALOGBUTTON_CANCEL; |
| 148 } | 148 } |
| OLD | NEW |