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

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

Issue 2517343002: Make indexed_db.mojom.BlobInfo.size a signed integer. (Closed)
Patch Set: Remove static cast in indexed_db_backing_store.cc:739. Created 4 years 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 | « content/browser/indexed_db/database_impl.cc ('k') | content/common/indexed_db/indexed_db.mojom » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 return false; 729 return false;
730 if (!DecodeStringWithLength(&slice, &type)) 730 if (!DecodeStringWithLength(&slice, &type))
731 return false; 731 return false;
732 if (is_file) { 732 if (is_file) {
733 if (!DecodeStringWithLength(&slice, &file_name)) 733 if (!DecodeStringWithLength(&slice, &file_name))
734 return false; 734 return false;
735 ret.push_back(IndexedDBBlobInfo(key, type, file_name)); 735 ret.push_back(IndexedDBBlobInfo(key, type, file_name));
736 } else { 736 } else {
737 if (!DecodeVarInt(&slice, &size) || size < 0) 737 if (!DecodeVarInt(&slice, &size) || size < 0)
738 return false; 738 return false;
739 ret.push_back(IndexedDBBlobInfo(type, static_cast<uint64_t>(size), key)); 739 ret.push_back(IndexedDBBlobInfo(type, size, key));
740 } 740 }
741 } 741 }
742 output->swap(ret); 742 output->swap(ret);
743 743
744 return true; 744 return true;
745 } 745 }
746 746
747 IndexedDBBackingStore::IndexedDBBackingStore( 747 IndexedDBBackingStore::IndexedDBBackingStore(
748 IndexedDBFactory* indexed_db_factory, 748 IndexedDBFactory* indexed_db_factory,
749 const Origin& origin, 749 const Origin& origin,
(...skipping 3779 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 4529
4530 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( 4530 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor(
4531 const WriteDescriptor& other) = default; 4531 const WriteDescriptor& other) = default;
4532 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = 4532 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() =
4533 default; 4533 default;
4534 IndexedDBBackingStore::Transaction::WriteDescriptor& 4534 IndexedDBBackingStore::Transaction::WriteDescriptor&
4535 IndexedDBBackingStore::Transaction::WriteDescriptor:: 4535 IndexedDBBackingStore::Transaction::WriteDescriptor::
4536 operator=(const WriteDescriptor& other) = default; 4536 operator=(const WriteDescriptor& other) = default;
4537 4537
4538 } // namespace content 4538 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/database_impl.cc ('k') | content/common/indexed_db/indexed_db.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698