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

Side by Side Diff: omaha_hash_calculator.cc

Issue 3170010: [update_engine] Update to use not-hideously-old logging API from chrome (Closed) Base URL: http://src.chromium.org/git/update_engine.git
Patch Set: Created 10 years, 4 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 | « mock_http_fetcher.cc ('k') | omaha_request_action.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 (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS 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 <openssl/bio.h> 5 #include <openssl/bio.h>
6 #include <openssl/buffer.h> 6 #include <openssl/buffer.h>
7 #include <openssl/evp.h> 7 #include <openssl/evp.h>
8 #include "chromeos/obsolete_logging.h" 8 #include "base/logging.h"
9 #include "update_engine/omaha_hash_calculator.h" 9 #include "update_engine/omaha_hash_calculator.h"
10 10
11 namespace chromeos_update_engine { 11 namespace chromeos_update_engine {
12 12
13 OmahaHashCalculator::OmahaHashCalculator() { 13 OmahaHashCalculator::OmahaHashCalculator() {
14 CHECK_EQ(SHA1_Init(&ctx_), 1); 14 CHECK_EQ(SHA1_Init(&ctx_), 1);
15 } 15 }
16 16
17 // Update is called with all of the data that should be hashed in order. 17 // Update is called with all of the data that should be hashed in order.
18 // Mostly just passes the data through to OpenSSL's SHA1_Update() 18 // Mostly just passes the data through to OpenSSL's SHA1_Update()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const std::string& str) { 58 const std::string& str) {
59 return OmahaHashOfBytes(str.data(), str.size()); 59 return OmahaHashOfBytes(str.data(), str.size());
60 } 60 }
61 61
62 std::string OmahaHashCalculator::OmahaHashOfData( 62 std::string OmahaHashCalculator::OmahaHashOfData(
63 const std::vector<char>& data) { 63 const std::vector<char>& data) {
64 return OmahaHashOfBytes(&data[0], data.size()); 64 return OmahaHashOfBytes(&data[0], data.size());
65 } 65 }
66 66
67 } // namespace chromeos_update_engine 67 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « mock_http_fetcher.cc ('k') | omaha_request_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698