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

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

Issue 1338001: Block database access on allowDatabase instead of databaseOpenFile. (Closed)
Patch Set: without worker support Created 10 years, 8 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
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/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 local_storage_value_(value), 43 local_storage_value_(value),
44 delegate_(delegate) { 44 delegate_(delegate) {
45 } 45 }
46 46
47 // Database 47 // Database
48 CookiePromptModalDialog::CookiePromptModalDialog( 48 CookiePromptModalDialog::CookiePromptModalDialog(
49 TabContents* tab_contents, 49 TabContents* tab_contents,
50 HostContentSettingsMap* host_content_settings_map, 50 HostContentSettingsMap* host_content_settings_map,
51 const GURL& origin, 51 const GURL& origin,
52 const string16& database_name, 52 const string16& database_name,
53 const string16& display_name,
54 unsigned long estimated_size,
53 CookiePromptModalDialogDelegate* delegate) 55 CookiePromptModalDialogDelegate* delegate)
54 : AppModalDialog(tab_contents, std::wstring()), 56 : AppModalDialog(tab_contents, std::wstring()),
55 host_content_settings_map_(host_content_settings_map), 57 host_content_settings_map_(host_content_settings_map),
56 dialog_type_(DIALOG_TYPE_DATABASE), 58 dialog_type_(DIALOG_TYPE_DATABASE),
57 origin_(origin), 59 origin_(origin),
58 database_name_(database_name), 60 database_name_(database_name),
61 display_name_(display_name),
62 estimated_size_(estimated_size),
59 delegate_(delegate) { 63 delegate_(delegate) {
60 } 64 }
61 65
62 // AppCache 66 // AppCache
63 CookiePromptModalDialog::CookiePromptModalDialog( 67 CookiePromptModalDialog::CookiePromptModalDialog(
64 TabContents* tab_contents, 68 TabContents* tab_contents,
65 HostContentSettingsMap* host_content_settings_map, 69 HostContentSettingsMap* host_content_settings_map,
66 const GURL& appcache_manifest_url, 70 const GURL& appcache_manifest_url,
67 CookiePromptModalDialogDelegate* delegate) 71 CookiePromptModalDialogDelegate* delegate)
68 : AppModalDialog(tab_contents, std::wstring()), 72 : AppModalDialog(tab_contents, std::wstring()),
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // static 125 // static
122 void CookiePromptModalDialog::RegisterPrefs(PrefService* prefs) { 126 void CookiePromptModalDialog::RegisterPrefs(PrefService* prefs) {
123 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false); 127 prefs->RegisterBooleanPref(prefs::kCookiePromptExpanded, false);
124 } 128 }
125 129
126 int CookiePromptModalDialog::GetDialogButtons() { 130 int CookiePromptModalDialog::GetDialogButtons() {
127 // Enable the automation interface to accept/dismiss this dialog. 131 // Enable the automation interface to accept/dismiss this dialog.
128 return MessageBoxFlags::DIALOGBUTTON_OK | 132 return MessageBoxFlags::DIALOGBUTTON_OK |
129 MessageBoxFlags::DIALOGBUTTON_CANCEL; 133 MessageBoxFlags::DIALOGBUTTON_CANCEL;
130 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698