| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/indexed_db/indexed_db_dispatcher.h" | 5 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 params.blob_or_file_info.resize(web_blob_info.size()); | 368 params.blob_or_file_info.resize(web_blob_info.size()); |
| 369 for (size_t i = 0; i < web_blob_info.size(); ++i) { | 369 for (size_t i = 0; i < web_blob_info.size(); ++i) { |
| 370 const WebBlobInfo& info = web_blob_info[i]; | 370 const WebBlobInfo& info = web_blob_info[i]; |
| 371 IndexedDBMsg_BlobOrFileInfo& blob_or_file_info = | 371 IndexedDBMsg_BlobOrFileInfo& blob_or_file_info = |
| 372 params.blob_or_file_info[i]; | 372 params.blob_or_file_info[i]; |
| 373 blob_or_file_info.is_file = info.isFile(); | 373 blob_or_file_info.is_file = info.isFile(); |
| 374 if (info.isFile()) { | 374 if (info.isFile()) { |
| 375 blob_or_file_info.file_path = info.filePath(); | 375 blob_or_file_info.file_path = info.filePath(); |
| 376 blob_or_file_info.file_name = info.fileName(); | 376 blob_or_file_info.file_name = info.fileName(); |
| 377 } else { | 377 blob_or_file_info.last_modified = info.lastModified(); |
| 378 blob_or_file_info.size = info.size(); | |
| 379 } | 378 } |
| 379 blob_or_file_info.size = info.size(); |
| 380 blob_or_file_info.uuid = info.uuid().latin1(); | 380 blob_or_file_info.uuid = info.uuid().latin1(); |
| 381 DCHECK(blob_or_file_info.uuid.size()); | 381 DCHECK(blob_or_file_info.uuid.size()); |
| 382 blob_or_file_info.mime_type = info.type(); | 382 blob_or_file_info.mime_type = info.type(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 Send(new IndexedDBHostMsg_DatabasePut(params)); | 385 Send(new IndexedDBHostMsg_DatabasePut(params)); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void IndexedDBDispatcher::RequestIDBDatabaseOpenCursor( | 388 void IndexedDBDispatcher::RequestIDBDatabaseOpenCursor( |
| 389 int32 ipc_database_id, | 389 int32 ipc_database_id, |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 typedef std::map<int32, WebIDBCursorImpl*>::iterator Iterator; | 792 typedef std::map<int32, WebIDBCursorImpl*>::iterator Iterator; |
| 793 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { | 793 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { |
| 794 if (i->first == ipc_exception_cursor_id || | 794 if (i->first == ipc_exception_cursor_id || |
| 795 i->second->transaction_id() != transaction_id) | 795 i->second->transaction_id() != transaction_id) |
| 796 continue; | 796 continue; |
| 797 i->second->ResetPrefetchCache(); | 797 i->second->ResetPrefetchCache(); |
| 798 } | 798 } |
| 799 } | 799 } |
| 800 | 800 |
| 801 } // namespace content | 801 } // namespace content |
| OLD | NEW |