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/renderer_host/database_dispatcher_host.cc

Issue 2858018: Add a "session only" policy to the content settings. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/net/chrome_cookie_policy.cc ('k') | chrome/common/content_settings.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/renderer_host/database_dispatcher_host.h" 5 #include "chrome/browser/renderer_host/database_dispatcher_host.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include "base/file_descriptor_posix.h" 8 #include "base/file_descriptor_posix.h"
9 #endif 9 #endif
10 10
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 Send(new ViewMsg_SignalCookiePromptEvent()); 414 Send(new ViewMsg_SignalCookiePromptEvent());
415 return; 415 return;
416 } 416 }
417 417
418 AllowDatabaseResponse(reply_msg, content_setting); 418 AllowDatabaseResponse(reply_msg, content_setting);
419 } 419 }
420 420
421 void DatabaseDispatcherHost::AllowDatabaseResponse( 421 void DatabaseDispatcherHost::AllowDatabaseResponse(
422 IPC::Message* reply_msg, ContentSetting content_setting) { 422 IPC::Message* reply_msg, ContentSetting content_setting) {
423 DCHECK((content_setting == CONTENT_SETTING_ALLOW) || 423 DCHECK((content_setting == CONTENT_SETTING_ALLOW) ||
424 (content_setting == CONTENT_SETTING_BLOCK)); 424 (content_setting == CONTENT_SETTING_BLOCK) ||
425 (content_setting == CONTENT_SETTING_SESSION_ONLY));
425 ViewHostMsg_AllowDatabase::WriteReplyParams( 426 ViewHostMsg_AllowDatabase::WriteReplyParams(
426 reply_msg, content_setting == CONTENT_SETTING_ALLOW); 427 reply_msg, content_setting != CONTENT_SETTING_BLOCK);
427 Send(reply_msg); 428 Send(reply_msg);
428 } 429 }
429 430
430 void DatabaseDispatcherHost::DatabaseClosed(const string16& origin_identifier, 431 void DatabaseDispatcherHost::DatabaseClosed(const string16& origin_identifier,
431 const string16& database_name) { 432 const string16& database_name) {
432 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); 433 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
433 if (!database_connections_.IsDatabaseOpened( 434 if (!database_connections_.IsDatabaseOpened(
434 origin_identifier, database_name)) { 435 origin_identifier, database_name)) {
435 ReceivedBadMessage(ViewHostMsg_DatabaseClosed::ID); 436 ReceivedBadMessage(ViewHostMsg_DatabaseClosed::ID);
436 return; 437 return;
(...skipping 14 matching lines...) Expand all
451 database_size, space_available)); 452 database_size, space_available));
452 } 453 }
453 } 454 }
454 455
455 void DatabaseDispatcherHost::OnDatabaseScheduledForDeletion( 456 void DatabaseDispatcherHost::OnDatabaseScheduledForDeletion(
456 const string16& origin_identifier, 457 const string16& origin_identifier,
457 const string16& database_name) { 458 const string16& database_name) {
458 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); 459 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
459 Send(new ViewMsg_DatabaseCloseImmediately(origin_identifier, database_name)); 460 Send(new ViewMsg_DatabaseCloseImmediately(origin_identifier, database_name));
460 } 461 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_cookie_policy.cc ('k') | chrome/common/content_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698