Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chrome/browser/message_box_handler.cc

Issue 651023: Pass in the HostContentSettingsMap to the CookieModalDialog so IsValid can ma... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/message_box_handler.h ('k') | chrome/browser/net/chrome_cookie_policy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_box_handler.h" 5 #include "chrome/browser/message_box_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/message_box_flags.h" 8 #include "app/message_box_flags.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/app_modal_dialog_queue.h" 10 #include "chrome/browser/app_modal_dialog_queue.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 message_text + L"\n\n" + 53 message_text + L"\n\n" +
54 l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER); 54 l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
55 Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog( 55 Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog(
56 tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE), 56 tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE),
57 MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text), 57 MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text),
58 std::wstring(), false, true, reply_msg)); 58 std::wstring(), false, true, reply_msg));
59 } 59 }
60 60
61 #if defined(OS_WIN) 61 #if defined(OS_WIN)
62 void RunCookiePrompt(TabContents* tab_contents, 62 void RunCookiePrompt(TabContents* tab_contents,
63 HostContentSettingsMap* host_content_settings_map,
63 const GURL& origin, 64 const GURL& origin,
64 const std::string& cookie_line, 65 const std::string& cookie_line,
65 CookiePromptModalDialogDelegate* delegate) { 66 CookiePromptModalDialogDelegate* delegate) {
66 Singleton<AppModalDialogQueue>()->AddDialog( 67 Singleton<AppModalDialogQueue>()->AddDialog(
67 new CookiePromptModalDialog(tab_contents, origin, cookie_line, delegate)); 68 new CookiePromptModalDialog(tab_contents, host_content_settings_map,
69 origin, cookie_line, delegate));
68 } 70 }
69 71
70 void RunLocalStoragePrompt( 72 void RunLocalStoragePrompt(
71 TabContents* tab_contents, 73 TabContents* tab_contents,
74 HostContentSettingsMap* host_content_settings_map,
72 const GURL& origin, 75 const GURL& origin,
73 const string16& key, 76 const string16& key,
74 const string16& value, 77 const string16& value,
75 CookiePromptModalDialogDelegate* delegate) { 78 CookiePromptModalDialogDelegate* delegate) {
76 Singleton<AppModalDialogQueue>()->AddDialog( 79 Singleton<AppModalDialogQueue>()->AddDialog(
77 new CookiePromptModalDialog(tab_contents, origin, key, value, delegate)); 80 new CookiePromptModalDialog(tab_contents, host_content_settings_map,
81 origin, key, value, delegate));
78 } 82 }
79 83
80 void RunDatabasePrompt( 84 void RunDatabasePrompt(
81 TabContents* tab_contents, 85 TabContents* tab_contents,
86 HostContentSettingsMap* host_content_settings_map,
82 const GURL& origin, 87 const GURL& origin,
83 const string16& database_name, 88 const string16& database_name,
84 CookiePromptModalDialogDelegate* delegate) { 89 CookiePromptModalDialogDelegate* delegate) {
85 Singleton<AppModalDialogQueue>()->AddDialog( 90 Singleton<AppModalDialogQueue>()->AddDialog(
86 new CookiePromptModalDialog(tab_contents, origin, database_name, 91 new CookiePromptModalDialog(tab_contents, host_content_settings_map,
87 delegate)); 92 origin, database_name, delegate));
88 } 93 }
89 #endif 94 #endif
90 95
OLDNEW
« no previous file with comments | « chrome/browser/message_box_handler.h ('k') | chrome/browser/net/chrome_cookie_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698