| 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 "chrome/browser/views/cookie_prompt_view.h" | 7 #include "chrome/browser/views/cookie_prompt_view.h" |
| 8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
| 9 #include "chrome/common/pref_service.h" | 9 #include "chrome/common/pref_service.h" |
| 10 | 10 |
| 11 CookiePromptModalDialog::CookiePromptModalDialog( | 11 CookiePromptModalDialog::CookiePromptModalDialog( |
| 12 TabContents* tab_contents, | 12 TabContents* tab_contents, |
| 13 const std::string& host, | 13 const GURL& url, |
| 14 const std::string& cookie_line, | 14 const std::string& cookie_line, |
| 15 CookiePromptModalDialogDelegate* delegate) | 15 CookiePromptModalDialogDelegate* delegate) |
| 16 : AppModalDialog(tab_contents, std::wstring()), | 16 : AppModalDialog(tab_contents, std::wstring()), |
| 17 host_(host), | 17 url_(url), |
| 18 cookie_line_(cookie_line), | 18 cookie_line_(cookie_line), |
| 19 cookie_ui_(true), | 19 cookie_ui_(true), |
| 20 delegate_(delegate) { | 20 delegate_(delegate) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 | 23 |
| 24 CookiePromptModalDialog::CookiePromptModalDialog( | 24 CookiePromptModalDialog::CookiePromptModalDialog( |
| 25 TabContents* tab_contents, | 25 TabContents* tab_contents, |
| 26 const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info, | 26 const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info, |
| 27 CookiePromptModalDialogDelegate* delegate) | 27 CookiePromptModalDialogDelegate* delegate) |
| 28 : AppModalDialog(tab_contents, std::wstring()), | 28 : AppModalDialog(tab_contents, std::wstring()), |
| 29 storage_info_(storage_info), | 29 storage_info_(storage_info), |
| 30 cookie_ui_(false), | 30 cookie_ui_(false), |
| 31 delegate_(delegate) { | 31 delegate_(delegate) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 void CookiePromptModalDialog::RegisterPrefs(PrefService* prefs) { | 35 void CookiePromptModalDialog::RegisterPrefs(PrefService* prefs) { |
| 36 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); | 36 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); |
| 37 } | 37 } |
| OLD | NEW |