| 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/prefs/pref_service.h" |
| 11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents.h" | 12 #include "chrome/browser/tab_contents/tab_contents.h" |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 | 14 |
| 15 // Cookies | 15 // Cookies |
| 16 CookiePromptModalDialog::CookiePromptModalDialog( | 16 CookiePromptModalDialog::CookiePromptModalDialog( |
| 17 TabContents* tab_contents, | 17 TabContents* tab_contents, |
| 18 HostContentSettingsMap* host_content_settings_map, | 18 HostContentSettingsMap* host_content_settings_map, |
| 19 const GURL& origin, | 19 const GURL& origin, |
| 20 const std::string& cookie_line, | 20 const std::string& cookie_line, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // static | 143 // static |
| 144 void CookiePromptModalDialog::RegisterUserPrefs(PrefService* prefs) { | 144 void CookiePromptModalDialog::RegisterUserPrefs(PrefService* prefs) { |
| 145 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); | 145 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); |
| 146 } | 146 } |
| 147 | 147 |
| 148 int CookiePromptModalDialog::GetDialogButtons() { | 148 int CookiePromptModalDialog::GetDialogButtons() { |
| 149 // Enable the automation interface to accept/dismiss this dialog. | 149 // Enable the automation interface to accept/dismiss this dialog. |
| 150 return MessageBoxFlags::DIALOGBUTTON_OK | | 150 return MessageBoxFlags::DIALOGBUTTON_OK | |
| 151 MessageBoxFlags::DIALOGBUTTON_CANCEL; | 151 MessageBoxFlags::DIALOGBUTTON_CANCEL; |
| 152 } | 152 } |
| OLD | NEW |