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

Side by Side Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 260783003: Some changes to support incognito mode, and some small cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo obsolete changes. Created 6 years, 7 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 | « content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/indexed_db/indexed_db_dispatcher_host.h" 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 ChildProcessSecurityPolicyImpl::GetInstance(); 645 ChildProcessSecurityPolicyImpl::GetInstance();
646 646
647 for (size_t i = 0; i < params.blob_or_file_info.size(); ++i) { 647 for (size_t i = 0; i < params.blob_or_file_info.size(); ++i) {
648 const IndexedDBMsg_BlobOrFileInfo& info = params.blob_or_file_info[i]; 648 const IndexedDBMsg_BlobOrFileInfo& info = params.blob_or_file_info[i];
649 if (info.is_file) { 649 if (info.is_file) {
650 base::FilePath path = base::FilePath::FromUTF16Unsafe(info.file_path); 650 base::FilePath path = base::FilePath::FromUTF16Unsafe(info.file_path);
651 if (!policy->CanReadFile(parent_->ipc_process_id_, path)) { 651 if (!policy->CanReadFile(parent_->ipc_process_id_, path)) {
652 parent_->BadMessageReceived(); 652 parent_->BadMessageReceived();
653 return; 653 return;
654 } 654 }
655 blob_info[i] = IndexedDBBlobInfo(path, info.file_name, info.mime_type); 655 blob_info[i] =
656 IndexedDBBlobInfo(info.uuid, path, info.file_name, info.mime_type);
656 } else { 657 } else {
657 blob_info[i] = IndexedDBBlobInfo(info.uuid, info.mime_type, info.size); 658 blob_info[i] = IndexedDBBlobInfo(info.uuid, info.mime_type, info.size);
658 } 659 }
659 } 660 }
660 661
661 // TODO(alecflett): Avoid a copy here. 662 // TODO(alecflett): Avoid a copy here.
662 IndexedDBValue value; 663 IndexedDBValue value;
663 value.bits = params.value; 664 value.bits = params.value;
664 value.blob_info.swap(blob_info); 665 value.blob_info.swap(blob_info);
665 connection->database()->Put( 666 connection->database()->Put(
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 } 979 }
979 980
980 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( 981 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed(
981 int32 ipc_object_id) { 982 int32 ipc_object_id) {
982 DCHECK( 983 DCHECK(
983 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 984 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
984 parent_->DestroyObject(&map_, ipc_object_id); 985 parent_->DestroyObject(&map_, ipc_object_id);
985 } 986 }
986 987
987 } // namespace content 988 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698