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

Side by Side Diff: blimp/common/blob_cache/in_memory_blob_cache.cc

Issue 1912153004: [blimp] Change to use SHA-256 instead of SHA-1 for unique ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from Wez Created 4 years, 8 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 | « blimp/common/blob_cache/id_util_unittest.cc ('k') | blimp/common/compositor/webp_decoder.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/common/blob_cache/in_memory_blob_cache.h" 5 #include "blimp/common/blob_cache/in_memory_blob_cache.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h"
11 8
12 namespace blimp { 9 namespace blimp {
13 10
14 InMemoryBlobCache::InMemoryBlobCache() {} 11 InMemoryBlobCache::InMemoryBlobCache() {}
15 12
16 InMemoryBlobCache::~InMemoryBlobCache() {} 13 InMemoryBlobCache::~InMemoryBlobCache() {}
17 14
18 void InMemoryBlobCache::Put(const BlobId& id, BlobDataPtr data) { 15 void InMemoryBlobCache::Put(const BlobId& id, BlobDataPtr data) {
19 if (Contains(id)) { 16 if (Contains(id)) {
20 // In cases where the engine has miscalculated what is already available 17 // In cases where the engine has miscalculated what is already available
(...skipping 11 matching lines...) Expand all
32 29
33 BlobDataPtr InMemoryBlobCache::Get(const BlobId& id) const { 30 BlobDataPtr InMemoryBlobCache::Get(const BlobId& id) const {
34 if (!Contains(id)) { 31 if (!Contains(id)) {
35 return nullptr; 32 return nullptr;
36 } 33 }
37 34
38 return cache_.find(id)->second; 35 return cache_.find(id)->second;
39 } 36 }
40 37
41 } // namespace blimp 38 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/common/blob_cache/id_util_unittest.cc ('k') | blimp/common/compositor/webp_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698