Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 index_ids.push_back(it.key); | 504 index_ids.push_back(it.key); |
| 505 index_keys.push_back(keys); | 505 index_keys.push_back(keys); |
| 506 } | 506 } |
| 507 | 507 |
| 508 IDBRequest* request = | 508 IDBRequest* request = |
| 509 IDBRequest::Create(script_state, source, transaction_.Get()); | 509 IDBRequest::Create(script_state, source, transaction_.Get()); |
| 510 Vector<char> wire_bytes; | 510 Vector<char> wire_bytes; |
| 511 serialized_value->ToWireBytes(wire_bytes); | 511 serialized_value->ToWireBytes(wire_bytes); |
| 512 RefPtr<SharedBuffer> value_buffer = SharedBuffer::AdoptVector(wire_bytes); | 512 RefPtr<SharedBuffer> value_buffer = SharedBuffer::AdoptVector(wire_bytes); |
| 513 | 513 |
| 514 UMA_HISTOGRAM_MEMORY_KB("WebCore.IndexedDB.PutValueSize", | |
| 515 value_buffer->size()); | |
| 516 | |
|
pwnall
2017/05/23 23:01:10
Could you please also UMA the number of Blobs atta
dmurph
2017/05/24 02:01:58
Done.
| |
| 514 request->StorePutOperationBlobs(serialized_value->BlobDataHandles()); | 517 request->StorePutOperationBlobs(serialized_value->BlobDataHandles()); |
| 515 | 518 |
| 516 BackendDB()->Put(transaction_->Id(), Id(), WebData(value_buffer), blob_info, | 519 BackendDB()->Put(transaction_->Id(), Id(), WebData(value_buffer), blob_info, |
| 517 key, static_cast<WebIDBPutMode>(put_mode), | 520 key, static_cast<WebIDBPutMode>(put_mode), |
| 518 request->CreateWebCallbacks().release(), index_ids, | 521 request->CreateWebCallbacks().release(), index_ids, |
| 519 index_keys); | 522 index_keys); |
| 520 return request; | 523 return request; |
| 521 } | 524 } |
| 522 | 525 |
| 523 IDBRequest* IDBObjectStore::deleteFunction(ScriptState* script_state, | 526 IDBRequest* IDBObjectStore::deleteFunction(ScriptState* script_state, |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1059 } | 1062 } |
| 1060 } | 1063 } |
| 1061 return IDBIndexMetadata::kInvalidId; | 1064 return IDBIndexMetadata::kInvalidId; |
| 1062 } | 1065 } |
| 1063 | 1066 |
| 1064 WebIDBDatabase* IDBObjectStore::BackendDB() const { | 1067 WebIDBDatabase* IDBObjectStore::BackendDB() const { |
| 1065 return transaction_->BackendDB(); | 1068 return transaction_->BackendDB(); |
| 1066 } | 1069 } |
| 1067 | 1070 |
| 1068 } // namespace blink | 1071 } // namespace blink |
| OLD | NEW |